-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fails to compile on FreeBSD (113.33.00) #8
Comments
If you have a patch, I can integrate it in the next minor release. Hopefully for the next major release we'll have freebsd builds on our side |
Here's a patch that fixes compilation for me (on FreeBSD 10.1), and to my knowledge is correct, but is completely untested, since I don't use quotas. In fact, I don't even know if --- src/extended_unix_stubs.c.orig 2016-04-28 12:46:22.000000000 +0300
+++ src/extended_unix_stubs.c 2016-06-23 01:58:03.000000000 +0300
@@ -92,7 +92,16 @@
CAMLreturn(v_ret);
}
-#if !(defined _LINUX_QUOTA_VERSION) /* BSD, Mac OS */
+#if defined (__FreeBSD__) || defined (__OpenBSD__)
+
+# define quota_control(device, cmd, id, parg) \
+ quotactl((device), (cmd), (id), (parg))
+# define QUOTA_BYTES_PER_SPACE_UNIT DEV_BSIZE
+# define QUOTA_SPACE_USED(quota) ((quota).dqb_curblocks)
+# define QUOTA_MODIFY_COMMAND Q_SETQUOTA
+# define QUOTA_SET_VALID_FIELDS(quota) ((void)quota)
+
+#elif !(defined _LINUX_QUOTA_VERSION) /* Mac OS */
# define quota_control(device, cmd, id, parg) \
quotactl((device), (cmd), (id), (parg))
|
Fixed by e3ba689 |
Why did you set QUOTA_BYTES_PER_SPACE_UNIT to 1 though? As far as I'm Now, dqb_curblocks is not really mentioned in any man page I know of, [1] http://svnweb.freebsd.org/base/release/10.2.0/usr.bin/quota/quota.c?revision=286717&view=markup |
The text was updated successfully, but these errors were encountered: