Closed wizardsd closed 4 months ago
Thanks, merged.
But please note: Linux, and just about every flavor of Unix for that matter, doesn't differentiate between binary and text files. There's nothing about O_BINARY or O_TEXT in POSIX; the concepts are irrelevant. https://www.man7.org/linux/man-pages/man2/open.2.html
I'm going to revert this commit due to an ERROR:
$ make
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99 -MMD -MF .deps/hcxpcapngtool.d -o hcxpcapngtool hcxpcapngtool.c -lssl -lcrypto -lz -DVERSION_TAG=\"6.3.4-32-gdad6a3a\" -DVERSION_YEAR=\"2024\" -DWANTZLIB
hcxpcapngtool.c: In function 'processcapfile':
hcxpcapngtool.c:5693:40: error: 'O_BINARY' undeclared (first use in this function); did you mean 'Z_BINARY'?
5693 | fd_pcap = open(pcapnameptr, O_RDONLY | O_BINARY);
| ^~~~
| Z_BINARY
hcxpcapngtool.c:5693:40: note: each undeclared identifier is reported only once for each function it appears in
make: *** No rule to make target 'hcxpcapngtool', needed by 'build'. Stop.
Your PR failed.
Which OS do you use?
getmagicnumber expects input file to be opened in the binary mode