]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/adouble.h
Fixes
[netatalk.git] / include / atalk / adouble.h
index 1151e2f49299ae4d31aea9f40ac981ed397d2bed..eac8be144cc7ecfec168d5b809b3a67edddb9f9a 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <sys/cdefs.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <sys/time.h>
 
 #include <netatalk/endian.h>
 #include <atalk/bstrlib.h>
+#include <atalk/locking.h>
 
 /* version info */
 #define AD_VERSION2     0x00020000
@@ -345,7 +345,7 @@ struct adouble {
 
 /* Refcounting open forks using one struct adouble */
 #define ad_ref(ad)   (ad)->ad_refcount++
-#define ad_unref(ad) (ad)->ad_refcount--
+#define ad_unref(ad) --((ad)->ad_refcount)
 
 /* ad_flush.c */
 extern int ad_rebuild_adouble_header (struct adouble *);
@@ -367,9 +367,16 @@ extern int ad_testlock      (struct adouble * /*adp*/, int /*eid*/, off_t /*off*
 extern u_int16_t ad_openforks (struct adouble * /*adp*/, u_int16_t);
 extern int ad_excl_lock     (struct adouble * /*adp*/, const u_int32_t /*eid*/);
 
+#if 0
 #define ad_lock ad_fcntl_lock
 #define ad_tmplock ad_fcntl_tmplock
 #define ad_unlock ad_fcntl_unlock
+#endif
+
+#define ad_lock rpc_lock
+#define ad_tmplock rpc_tmplock
+#define ad_unlock rpc_unlock
+
 
 /* ad_open.c */
 extern const char *oflags2logstr(int oflags);