Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake/config_posix Add missing Feature test Macro
From man be32toh: Feature Test Macro Requirements for glibc (see feature_test_macros(7)): htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh(): Since glibc 2.19: _DEFAULT_SOURCE In glibc up to and including 2.19: _BSD_SOURCE Fixes build error: [ 59%] Building C object examples/CMakeFiles/felica-read-ndef.dir/felica-read-ndef.c.o /tmp/libfreefare/examples/felica-read-ndef.c: In function ‘main’: /tmp/libfreefare/examples/felica-read-ndef.c:113:21: warning: implicit declaration of function ‘be32toh’ [-Wimplicit-function-declaration] payload_length = be32toh(*(uint32_t *)(ndef_record + 2)); ^~~~~~~ [ 61%] Linking C executable felica-read-ndef /usr/bin/ld: CMakeFiles/felica-read-ndef.dir/felica-read-ndef.c.o: in function `main': felica-read-ndef.c:(.text+0x319): undefined reference to `be32toh' collect2: error: ld returned 1 exit status Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
- Loading branch information