Unverified Commit 9bb6a269 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

p0f: fix build for GCC 14

parent 83c45b91
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
diff --git a/build.sh b/build.sh
index f674433..f181344 100755
--- a/build.sh
+++ b/build.sh
@@ -197,7 +197,7 @@ echo -n "[*] Checking if memory alignment is required... "
 
 rm -f "$TMP" "$TMP.c" "$TMP.log" || exit 1
 
-echo -e "#include \"types.h\"\nvolatile u8 tmp[6]; int main() { printf(\"%d\x5cn\", *(u32*)(tmp+1)); return 0; }" >"$TMP.c" || exit 1
+echo -e "#include \"types.h\"\n#include \"stdio.h\"\nvolatile u8 tmp[6]; int main() { printf(\"%d\x5cn\", *(u32*)(tmp+1)); return 0; }" >"$TMP.c" || exit 1
 $CC $USE_CFLAGS $USE_LDFLAGS "$TMP.c" -o "$TMP" &>"$TMP.log"
 
 if [ ! -x "$TMP" ]; then
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {

  buildInputs = [ libpcap ];

  patches = [ ./build-stdio.patch ];

  buildPhase = ''
    substituteInPlace config.h --replace "p0f.fp" "$out/etc/p0f.fp"
    substituteInPlace build.sh --replace "/bin/bash" "${bash}/bin/bash"