Loading pkgs/by-name/p0/p0f/build-stdio.patch 0 → 100644 +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 pkgs/by-name/p0/p0f/package.nix +2 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading
pkgs/by-name/p0/p0f/build-stdio.patch 0 → 100644 +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
pkgs/by-name/p0/p0f/package.nix +2 −0 Original line number Diff line number Diff line Loading @@ -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" Loading