Skip to content

Conversation

@0-wiz-0
Copy link
Contributor

@0-wiz-0 0-wiz-0 commented Aug 10, 2014

One field name in struct statvfs is different than one Solaris; adapt.
Fixes build on NetBSD, since statfs support was removed.

One field name in struct statvfs is different than one Solaris; adapt.
Fixes build on NetBSD, since statfs support was removed.
@0-wiz-0 0-wiz-0 mentioned this pull request Aug 10, 2014
Fixes
root.c:1987:36: error: initialization makes pointer from integer without a cast [-Werror]
with gcc-4.8.3 on NetBSD.
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.
@wez
Copy link
Contributor

wez commented Aug 10, 2014

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
Copy link
Contributor

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.
@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Aug 10, 2014

Thanks for the comments. I've added two more patches to address your suggestions.
And I've filled out the contributor form.

fstype.c Outdated
Copy link
Contributor

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.
@wez
Copy link
Contributor

wez commented Aug 11, 2014

Thanks!
I applied your commits using hub am https://github.com/facebook/watchman/pull/51

@wez wez closed this Aug 11, 2014
facebook-github-bot pushed a commit that referenced this pull request Jun 3, 2020
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
facebook-github-bot pushed a commit that referenced this pull request Sep 18, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants