]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
caps.h: Rename __errno to ___errno
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 3 Jan 2013 17:24:18 +0000 (12:24 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 9 Jan 2013 15:14:34 +0000 (10:14 -0500)
At least bionic defines __errno, so this was causing a conflict in caps.h
leading to build failure. Renaming to ___errno avoids that conflicting
definition.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/caps.h

index dc3fd6fcf4a1ac9a0b1233f8cdb116fd6428cc10..b5b83457548ae14b8c15d86199875506882da5f5 100644 (file)
@@ -58,28 +58,28 @@ static inline int lxc_caps_last_cap(void) {
 #define lxc_priv(__lxc_function)                       \
        ({                                              \
                __label__ out;                          \
-               int __ret, __ret2, __errno = 0;         \
+               int __ret, __ret2, ___errno = 0;                \
                __ret = lxc_caps_up();                  \
                if (__ret)                              \
                        goto out;                       \
                __ret = __lxc_function;                 \
                if (__ret)                              \
-                       __errno = errno;                \
+                       ___errno = errno;               \
                __ret2 = lxc_caps_down();               \
-       out:    __ret ? errno = __errno,__ret : __ret2; \
+       out:    __ret ? errno = ___errno,__ret : __ret2;        \
        })
 
 #define lxc_unpriv(__lxc_function)                     \
        ({                                              \
                __label__ out;                          \
-               int __ret, __ret2, __errno = 0;         \
+               int __ret, __ret2, ___errno = 0;                \
                __ret = lxc_caps_down();                \
                if (__ret)                              \
                        goto out;                       \
                __ret = __lxc_function;                 \
                if (__ret)                              \
-                       __errno = errno;                \
+                       ___errno = errno;               \
                __ret2 = lxc_caps_up();                 \
-       out:    __ret ? errno = __errno,__ret : __ret2; \
+       out:    __ret ? errno = ___errno,__ret : __ret2;        \
        })
 #endif