LOCK_WRITE enum in phodav-priv.h conflicts with asm-generic/fcntl.h on Linux
This problem was found when compiling phodav in Termux environment on an Android phone. If I rename LOCK_WRITE
to LOCK_WRITX
, phodav can be successfully built.
$ ninja -j1
[1/22] Compiling C object 'libphodav...v-2.0@sha/phodav-method-delete.c.o'
FAILED: libphodav/276da3a@@phodav-2.0@sha/phodav-method-delete.c.o
cc -Ilibphodav/276da3a@@phodav-2.0@sha -Ilibphodav -I../libphodav -I. -I../ -I/data/data/com.termux/files/usr/include/gio-unix-2.0 -I/data/data/com.termux/files/usr/include/glib-2.0 -I/data/data/com.termux/files/usr/lib/glib-2.0/include -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/libsoup-2.4 -I/data/data/com.termux/files/usr/include/libxml2 -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -pthread '-DG_LOG_DOMAIN="phodav"' -MD -MQ 'libphodav/276da3a@@phodav-2.0@sha/phodav-method-delete.c.o' -MF 'libphodav/276da3a@@phodav-2.0@sha/phodav-method-delete.c.o.d' -o 'libphodav/276da3a@@phodav-2.0@sha/phodav-method-delete.c.o' -c ../libphodav/phodav-method-delete.c
In file included from ../libphodav/phodav-method-delete.c:19:
../libphodav/phodav-priv.h:47:3: error: expected identifier
LOCK_WRITE,
^
/data/data/com.termux/files/usr/include/asm-generic/fcntl.h:141:20: note: expanded from macro 'LOCK_WRITE'
#define LOCK_WRITE 128
^
1 error generated.
ninja: build stopped: subcommand failed.