mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
From 18ca43507b351f339ff23062541ee8d58e813a53 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Forster <ff@octo.it>
|
||||
Date: Sun, 29 Jul 2018 14:34:19 +0200
|
||||
Subject: [PATCH] ping_host_add: Decrease buffer size to make GCC's truncation
|
||||
check happy.
|
||||
|
||||
Fixes: #38
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/octo/liboping/commit/18ca43507b351f339ff23062541ee8d58e813a53]
|
||||
---
|
||||
src/liboping.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/liboping.c b/src/liboping.c
|
||||
index 5253e8c..2470988 100644
|
||||
--- a/src/liboping.c
|
||||
+++ b/src/liboping.c
|
||||
@@ -1636,10 +1636,8 @@ int ping_host_add (pingobj_t *obj, const char *host)
|
||||
}
|
||||
else
|
||||
{
|
||||
- char errmsg[PING_ERRMSG_LEN];
|
||||
-
|
||||
- snprintf (errmsg, PING_ERRMSG_LEN, "Unknown `ai_family': %i", ai_ptr->ai_family);
|
||||
- errmsg[PING_ERRMSG_LEN - 1] = '\0';
|
||||
+ char errmsg[64];
|
||||
+ snprintf (errmsg, sizeof(errmsg), "Unknown `ai_family': %d", ai_ptr->ai_family);
|
||||
|
||||
dprintf ("%s", errmsg);
|
||||
ping_set_error (obj, "getaddrinfo", errmsg);
|
||||
7
package/liboping/Config.in
Normal file
7
package/liboping/Config.in
Normal file
@@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_LIBOPING
|
||||
bool "liboping"
|
||||
help
|
||||
liboping is a C library to generate ICMP echo requests,
|
||||
better known as "ping packets".
|
||||
|
||||
http://noping.cc/
|
||||
5
package/liboping/liboping.hash
Normal file
5
package/liboping/liboping.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From http://noping.cc/#download
|
||||
sha256 eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8 liboping-1.10.0.tar.bz2
|
||||
|
||||
# Hash for license file:
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
|
||||
22
package/liboping/liboping.mk
Normal file
22
package/liboping/liboping.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# liboping
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBOPING_VERSION = 1.10.0
|
||||
LIBOPING_SITE = http://noping.cc/files
|
||||
LIBOPING_SOURCE = liboping-$(LIBOPING_VERSION).tar.bz2
|
||||
LIBOPING_INSTALL_STAGING = YES
|
||||
LIBOPING_CONF_OPTS = --without-perl-bindings
|
||||
LIBOPING_LICENSE = LGPL-2.1+, GPL-2.0
|
||||
LIBOPING_LICENSE_FILES = COPYING
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
||||
LIBOPING_DEPENDENCIES += ncurses
|
||||
LIBOPING_CONF_OPTS += --with-ncurses
|
||||
else
|
||||
LIBOPING_CONF_OPTS += --without-ncurses
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user