Closed iceman1001 closed 7 years ago
That's an interesting one. Compiles fine on Kali and mingw. Could you please try to change
extern uint32_t le32toh (uint8_t *data);
to extern uint32_t le32toh(uint8_t *data);
(i.e. remove the space before the bracket).
ser@ubuntu:~/pm3_master/tools/mfkey$ make all gcc -I../../common -I../../client -Wall -O4 -o mfkey32 crypto1.o crapto1.o util.o mfkey.o mfkey32.c In file included from /usr/include/i386-linux-gnu/bits/waitstatus.h:64:0, from /usr/include/stdlib.h:42, from mfkey32.c:4: ../../client/util.h:75:33: error: expected ‘)’ before ‘’ token extern uint32_t le32toh(uint8_t data); ^ Makefile:17: recipe for target 'mfkey32' failed make: *** [mfkey32] Error 1
I should read more carefully.
There was a clash between the predefined le32toh in
Maybe remove one in util.h, to use the predefined instead?
Definitely to be considered. But if adding -std=c99 fixes the issue, the predefinition seems not to conform to C99.
I have too little understanding in what c99 does when specified to gcc to comment further. Shouldn't basic stuff le32toh exist in c99 somewhere?
According to http://man7.org/linux/man-pages/man3/endian.3.html
These functions are nonstandard.
System: Ubuntu 16.04 gcc v5.4 latest source from github