-
Notifications
You must be signed in to change notification settings - Fork 1k
Use statvfs on NetBSD. #51
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
Conversation
One field name in struct statvfs is different than one Solaris; adapt. Fixes build on NetBSD, since statfs support was removed.
Fixes error: array subscript has type ‘char’ with gcc-4.8.3 on NetBSD. See the CAVEATS section in http://netbsd.gw.com/cgi-bin/man-cgi?ctype+3+NetBSD-current for an explanation what the problem with "type 'char'" is.
|
Thanks! I think this PR is pretty straightforward and doesn't strictly require this (although maybe one or two lines are wider than 80 columns and should be wrapped), but as a note in case you find some other stuff that needs to be fixed up on NetBSD, https://facebook.github.io/watchman/contributing.html shows how to get the Arcanist tool that drives our test suite so that you can make sure. We need to ask you fill out our CLA before I can apply this to our tree; we use the same language/structure as the Apache CLA (just different actors!) and you can fill it out online here: https://code.facebook.com/cla |
root.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just eyeballing this; it looks longer than 80 columns.
To keep the length down, can you switch it to this:
// NetBSD defines udata as intptr type, so the cast is necessary
struct watchman_file *file = (void *)root->keventbuf[i].udata;
I think this is more honestly expressing what we want anyway: on FreeBSD and also on OS X (even though we no longer use kqueue there) udata is defined as a void pointer.
Another method to get rid of the warning, suggested by Wez Furlong.
Suggested by Wez Furlong.
|
Thanks for the comments. I've added two more patches to address your suggestions. |
fstype.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in light of your findings, I think the simplest solution is to change this line to:
#elif HAVE_SYS_STATVFS_H && !defined(__APPLE__)
The statvfs interface there does not provide the wanted information.
Requested by Wez Furlong.
|
Thanks! |
Summary: Typo in python shebang introduced by 0d19e27, probably by accident. Found while skimming the code. Pull Request resolved: facebook/openr#51 Reviewed By: steven1327 Differential Revision: D21865922 Pulled By: saifhhasan fbshipit-source-id: 5f2c2c2fac82078070920915812139f5fef1c7fe
…deps and use them in tests (#51) Summary: Pull Request resolved: facebook/sapling#51 This diff extends capabilities of CargoBuilder in getdeps so that individual manifests can be build even without workspaces. Thanks to that a build for edenapi/tools can be made and its artifacts can be used in mononoke integration tests. Reviewed By: StanislavGlebik Differential Revision: D23574887 fbshipit-source-id: 8a974a6b5235d36a44fe082aad55cd380d84dd09
One field name in struct statvfs is different than one Solaris; adapt.
Fixes build on NetBSD, since statfs support was removed.