Skip to content
Browse files

Don't compile bup_get_Linux_file_attr on systems without FS_IOC_GETFL…

  • Loading branch information...
1 parent 8be6d5b commit 1fe7783a2e8b16eefddff0abe1759769e8ad72b5 @dickon dickon committed with apenwarr
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/bup/_helpers.c
4 lib/bup/_helpers.c
@@ -630,7 +630,7 @@ static PyObject *fadvise_done(PyObject *self, PyObject *args)
-#ifdef linux
+#if defined(linux) && defined(FS_IOC_GETFLAGS)
static PyObject *bup_get_linux_file_attr(PyObject *self, PyObject *args)
int rc;
@@ -899,7 +899,7 @@ static PyMethodDef helper_methods[] = {
"open() the given filename for read with O_NOATIME if possible" },
{ "fadvise_done", fadvise_done, METH_VARARGS,
"Inform the kernel that we're finished with earlier parts of a file" },
-#ifdef linux
+#if defined(linux) && defined(FS_IOC_GETFLAGS)
{ "get_linux_file_attr", bup_get_linux_file_attr, METH_VARARGS,
"Return the Linux attributes for the given file." },
{ "set_linux_file_attr", bup_set_linux_file_attr, METH_VARARGS,

0 comments on commit 1fe7783

Please sign in to comment.
Something went wrong with that request. Please try again.