$NetBSD: patch-GNUmakefile,v 1.2 2024/04/29 09:27:40 nia Exp $

Our package libnet11 is installed in slightly different directories.

Let pkgsrc make its own choices about hardening flags.

--- GNUmakefile.orig	2019-08-30 11:09:00.000000000 +0000
+++ GNUmakefile
@@ -335,9 +335,9 @@ endif
 
 # Always search filesystem for libnet because libnet-config is unreliable
 ifneq ($(filter -DWITHOUT_MIRROR,$(FEATURES)),-DWITHOUT_MIRROR)
-LIBNET_FOUND:=	$(call locate,libnet,include/libnet-1.1/libnet.h,$(LIBNET_BASE))
+LIBNET_FOUND:=	$(call locate,libnet,include/libnet11/libnet.h,$(LIBNET_BASE))
 ifdef LIBNET_FOUND
-LIBNET_FOUND_INC:=	$(LIBNET_FOUND)/include/libnet-1.1
+LIBNET_FOUND_INC:=	$(LIBNET_FOUND)/include/libnet11
 else
 LIBNET_FOUND:=	$(call locate,libnet,include/libnet.h,$(LIBNET_BASE))
 LIBNET_FOUND_INC:=	$(LIBNET_FOUND)/include
@@ -367,7 +367,7 @@ endif
 ifneq ($(filter -DWITHOUT_MIRROR,$(FEATURES)),-DWITHOUT_MIRROR)
 ifdef LIBNET_FOUND
 PKG_CPPFLAGS+=	-I$(LIBNET_FOUND_INC)
-PKG_LDFLAGS+=	-L$(LIBNET_FOUND)/lib
+PKG_LDFLAGS+=	-L$(LIBNET_FOUND)/lib/libnet11
 PKG_LIBS+=	-lnet
 endif
 ifdef LIBPCAP_FOUND
@@ -407,8 +407,7 @@ TPKG_CPPFLAGS:=	$(subst -I,-isystem,$(TP
 endif
 
 CFLAGS+=	$(PKG_CFLAGS) \
-		-std=c99 -Wall -Wextra -pedantic \
-		-D_FORTIFY_SOURCE=2 -fstack-protector-all
+		-std=c99 -Wall -Wextra -pedantic
 CPPFLAGS+=	$(PKG_CPPFLAGS) $(CPPDEFS) $(FEATURES)
 TCPPFLAGS+=	$(TPKG_CPPFLAGS)
 LDFLAGS+=	$(PKG_LDFLAGS)
