]> git.proxmox.com Git - mirror_spl.git/commitdiff
Use Linux flock struct
authorBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 20 Feb 2011 22:02:48 +0000 (14:02 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 22:32:15 +0000 (14:32 -0800)
Rather than defining our own structure which will conflict with
Linux's version when building 32-bit.  Simply setup a typedef
to always use the correct Linux version for both 32 ad 64-bit
builds.

include/sys/fcntl.h

index c7bc02a6e7dec98e9449d85cf02579ee47372166..4e260a4b8d7f2e68d426cf66be10130c2ccca844 100644 (file)
 
 #define F_FREESP 11
 
-typedef struct flock64 {
-       short   l_type;
-       short   l_whence;
-       loff_t  l_start;
-       loff_t  l_len;
-       pid_t   l_pid;
-} flock64_t;
+#ifdef CONFIG_64BIT
+typedef struct flock flock64_t;
+#else
+typedef struct flock64 flock64_t;
+#endif /* CONFIG_64BIT */
 
 #endif /* _SPL_FCNTL_H */