{"action":"created","issue":{"url":"https://api.github.com/repos/sheepdog/sheepdog/issues/252","repository_url":"https://api.github.com/repos/sheepdog/sheepdog","labels_url":"https://api.github.com/repos/sheepdog/sheepdog/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/sheepdog/sheepdog/issues/252/comments","events_url":"https://api.github.com/repos/sheepdog/sheepdog/issues/252/events","html_url":"https://github.com/sheepdog/sheepdog/pull/252","id":160355280,"number":252,"title":"lib: fix the build error on centos","user":{"login":"FrankYu","id":1559974,"avatar_url":"https://avatars.githubusercontent.com/u/1559974?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankYu","html_url":"https://github.com/FrankYu","followers_url":"https://api.github.com/users/FrankYu/followers","following_url":"https://api.github.com/users/FrankYu/following{/other_user}","gists_url":"https://api.github.com/users/FrankYu/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankYu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankYu/subscriptions","organizations_url":"https://api.github.com/users/FrankYu/orgs","repos_url":"https://api.github.com/users/FrankYu/repos","events_url":"https://api.github.com/users/FrankYu/events{/privacy}","received_events_url":"https://api.github.com/users/FrankYu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-15T07:26:09Z","updated_at":"2016-06-15T11:01:38Z","closed_at":"2016-06-15T08:22:36Z","pull_request":{"url":"https://api.github.com/repos/sheepdog/sheepdog/pulls/252","html_url":"https://github.com/sheepdog/sheepdog/pull/252","diff_url":"https://github.com/sheepdog/sheepdog/pull/252.diff","patch_url":"https://github.com/sheepdog/sheepdog/pull/252.patch"},"body":"Met below error on centos\r\n\r\ncommon.c: In function ‘atomic_create_and_write’:\r\ncommon.c:78:9: error: ‘FALLOC_FL_KEEP_SIZE’ undeclared (first use in this function)\r\n     fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,\r\n         ^\r\ncommon.c:78:9: note: each undeclared identifier is reported only once for each function it appears in\r\ncommon.c:78:31: error: ‘FALLOC_FL_PUNCH_HOLE’ undeclared (first use in this function)\r\n     fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,\r\n                               ^\r\nmake[1]: *** [common.o] Error 1\r\n\r\nSigned-off-by: Frank Yu <flyxiaoyu@gmail.com>"},"comment":{"url":"https://api.github.com/repos/sheepdog/sheepdog/issues/comments/226155546","html_url":"https://github.com/sheepdog/sheepdog/pull/252#issuecomment-226155546","issue_url":"https://api.github.com/repos/sheepdog/sheepdog/issues/252","id":226155546,"user":{"login":"tmenjo","id":1230201,"avatar_url":"https://avatars.githubusercontent.com/u/1230201?v=3","gravatar_id":"","url":"https://api.github.com/users/tmenjo","html_url":"https://github.com/tmenjo","followers_url":"https://api.github.com/users/tmenjo/followers","following_url":"https://api.github.com/users/tmenjo/following{/other_user}","gists_url":"https://api.github.com/users/tmenjo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmenjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmenjo/subscriptions","organizations_url":"https://api.github.com/users/tmenjo/orgs","repos_url":"https://api.github.com/users/tmenjo/repos","events_url":"https://api.github.com/users/tmenjo/events{/privacy}","received_events_url":"https://api.github.com/users/tmenjo/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T11:01:38Z","updated_at":"2016-06-15T11:01:38Z","body":"@FrankYu thanks for your fix.\r\n\r\nI find that [sheep/store/common.c](https://github.com/sheepdog/sheepdog/blob/master/sheep/store/common.c), using `FALLOC_FL_KEEP_SIZE` and `FALLOC_FL_PUNCH_HOLE` macros, includes not only `fcntl.h` but also `linux/falloc.h`, and the two macros are originally defined in `uapi/linux/falloc.h` which is included in `linux/falloc.h`. I think it is much better to include appropriate headers than to define the macros directly in our code. I will work on this in the near future.\r\n\r\nSee also:\r\n* http://lxr.free-electrons.com/source/include/uapi/linux/falloc.h\r\n* http://lxr.free-electrons.com/source/include/linux/falloc.h\r\n"}}
{"actor":{"display_login":"tmenjo"}}