From 2ae494bd2e3303141a703f32e44263e083c1ffb0 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Tue, 17 Dec 2019 01:13:54 +0100 Subject: [PATCH] ACL init: only define the extra variables when needed This should show fewer (well, none hopefully) compiler warnings on non-Linux platforms. --- acl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acl.c b/acl.c index 2433dab..a774627 100644 --- a/acl.c +++ b/acl.c @@ -147,14 +147,18 @@ static int ACL_init(PyObject* obj, PyObject* args, PyObject *keywds) { #endif ; acl_t new = NULL; +#ifdef HAVE_LINUX int mode = -1; +#endif PyObject *file = NULL; PyObject *filedef = NULL; char *text = NULL; PyObject *fd = NULL; ACL_Object* thesrc = NULL; +#ifdef HAVE_ACL_COPY_EXT const void *buf = NULL; Py_ssize_t bufsize; +#endif int set_err = 0; if(!PyTuple_Check(args) || PyTuple_Size(args) != 0 || -- 2.39.2