netatalk-3.1.3 fails to compile on Debian Wheezy (tried on both amd64 and armel archs). netatalk-3.1.2 compiles fine on the same machines.
./configure --with-pkgconfdir=/etc/netatalk --with-init-style=debian make (...) make[3]: Entering directory `/home/user/compile/netatalk-3.1.3/libatalk/util' CC libutil_la-bprint.lo CC libutil_la-cnid.lo CC libutil_la-fault.lo CC libutil_la-getiface.lo CC libutil_la-gettok.lo CC libutil_la-locking.lo CC libutil_la-logger.lo CC libutil_la-module.lo CC libutil_la-netatalk_conf.lo netatalk_conf.c: In function 'creatvol': netatalk_conf.c:680:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] CC libutil_la-queue.lo CC libutil_la-server_child.lo CC libutil_la-server_ipc.lo CC libutil_la-server_lock.lo CC libutil_la-socket.lo CC libutil_la-strdicasecmp.lo CC libutil_la-unix.lo unix.c: In function 'ochmod': unix.c:272:19: error: 'O_IGNORE' undeclared (first use in this function) unix.c:272:19: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [libutil_la-unix.lo] Error 1 make[3]: Leaving directory `/home/user/compile/netatalk-3.1.3/libatalk/util' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/compile/netatalk-3.1.3/libatalk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/compile/netatalk-3.1.3' make: *** [all] Error 2
This happens with --without-acls. the acl.h header defining O_IGNORE is only included with acl.
Same on Gentoo https://bugs.gentoo.org/show_bug.cgi?id=516626
Will not compile on platforms without ACL support.
If you do need to compile it before a proper fix is submitted and no ACL support is available:
1) Modify netatalk/libatalk/util/unix.c so that ochmod() just returns zero (just delete most lines):
2) Modify netatalk/include/atalk/volume.h so vol_chmod_opt(vol) always returns zero (replace O_IGNORE with 0):
That makes it compile on platforms like cygwin and optware where ACLs are not supported. For any large UNIX/Linux variant, running configure --with-acls will work without changes.
modify include/atalk/acl.h, start at line 63, add #define O_IGNORE 0 to make it look like following:
which solves the problem failed compile on system without acl support.
I got it working with a simple:
apt-get install libacl1-dev
Or on Centos 7 / RHEL7:
yum install libacl-devel
Fixed in 3.1.9