package/dhcpdump: bump to version 1.9

- Switch to an active fork (which is already used by Fedora 39)
- Drop patch (not needed since
  be272278c3)
- HAVE_STRSEP has been dropped since
  0f7c525da6
- CFLAGS and LDFLAGS must be set since
  6eac74e7ef
- This bump will fix the following build failure with gcc 14 thanks to
  be272278c3:

dhcpdump.c: In function 'pcap_callback':
dhcpdump.c:153:17: error: implicit declaration of function 'strftime' [-Wimplicit-function-declaration]
  153 |                 strftime(timestamp, sizeof(timestamp), "%Y-%m-%d %H:%M:%S.",
      |                 ^~~~~~~~
dhcpdump.c:28:1: note: include '<time.h>' or provide a declaration of 'strftime'
   27 | #include "dhcp_options.h"
  +++ |+#include <time.h>
   28 |

https://github.com/bbonev/dhcpdump/releases/tag/v1.9

Fixes:
 - http://autobuild.buildroot.org/results/9e559d634ac4e06f74f7b9e0402e45209aef2952

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine
2024-05-21 21:00:01 +02:00
committed by Peter Korsgaard
parent e7f25b2b40
commit 86b39fbe7d
5 changed files with 8 additions and 33 deletions

View File

@@ -533,7 +533,6 @@ package/dhcp/S80dhcp-relay Shellcheck lib_sysv.Variables
package/dhcp/S80dhcp-server Shellcheck lib_sysv.Variables
package/dhcp/dhclient-script Shellcheck lib_shellscript.TrailingSpace
package/dhcpcd/S41dhcpcd lib_sysv.Indent lib_sysv.Variables
package/dhcpdump/0001-use-non-bsd-structures.patch lib_patch.Upstream
package/dhrystone/0001-cmdline-nruns.patch lib_patch.Sob lib_patch.Upstream
package/dhrystone/0002-HZ.patch lib_patch.Sob lib_patch.Upstream
package/dhrystone/0003-exit.patch lib_patch.Sob lib_patch.Upstream

View File

@@ -1,23 +0,0 @@
The udphdr structure has uh_* fields when _FAVOR_BSD is
defined. Otherwise, the fields are just named source, dest, len and
check. See <netinet/udp.h>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: dhcpdump-1.8/dhcpdump.c
===================================================================
--- dhcpdump-1.8.orig/dhcpdump.c 2011-05-17 20:20:46.506980003 +0200
+++ dhcpdump-1.8/dhcpdump.c 2011-05-17 20:20:59.338979999 +0200
@@ -163,10 +163,10 @@
strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
- if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
+ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
return;
- printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
+ printdata((u_char *)(sp + offset), ntohs(udp->len));
}
// check for matching CHADDR (Peter Apian-Bennewitz <apian@ise.fhg.de>)

View File

@@ -4,4 +4,4 @@ config BR2_PACKAGE_DHCPDUMP
help
A tool for monitoring dhcp requests using tcpdump.
http://www.mavetju.org/unix/general.php
https://github.com/bbonev/dhcpdump

View File

@@ -1,3 +1,3 @@
# Locally calculated
sha256 6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190 dhcpdump-1.8.tar.gz
sha256 3658ac21cc33e79e72bed070454e49c543017991cb6c37f4253c85e9176869d1 dhcpdump-1.9.tar.xz
sha256 bab6ca76b7e93885396513689b1248dfb0e8fd662695b8bd1b26784ef71a0192 LICENSE

View File

@@ -4,8 +4,9 @@
#
################################################################################
DHCPDUMP_VERSION = 1.8
DHCPDUMP_SITE = http://www.mavetju.org/download
DHCPDUMP_VERSION = 1.9
DHCPDUMP_SOURCE = dhcpdump-$(DHCPDUMP_VERSION).tar.xz
DHCPDUMP_SITE = https://github.com/bbonev/dhcpdump/releases/download/v$(DHCPDUMP_VERSION)
DHCPDUMP_DEPENDENCIES = libpcap
DHCPDUMP_LICENSE = BSD-2-Clause
DHCPDUMP_LICENSE_FILES = LICENSE
@@ -15,12 +16,10 @@ ifeq ($(BR2_STATIC_LIBS),y)
DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
endif
# glibc, uclibc and musl have strsep()
DHCPDUMP_CFLAGS = $(TARGET_CFLAGS) -DHAVE_STRSEP
define DHCPDUMP_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(DHCPDUMP_CFLAGS) \
-D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)" dhcpdump
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(DHCPDUMP_LIBS)" dhcpdump
endef
define DHCPDUMP_INSTALL_TARGET_CMDS