3742. [port] linux: libcap support: curval was used before it

was declared. [RT #35387]

(cherry picked from commit 5114325978)
This commit is contained in:
Mark Andrews
2014-02-18 00:27:15 +11:00
parent 106a67b68f
commit 71efd2bdcc
2 changed files with 4 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
3742. [port] linux: libcap support: curval was used before it
was declared. [RT #35387]
3740. [contrib] Minor fixes to configure --with-dlz-bdb,
--with-dlz-postgres and --with-dlz-odbc. [RT #35340]

View File

@@ -197,8 +197,8 @@ linux_setcaps(cap_t caps) {
#ifdef HAVE_LIBCAP
#define SET_CAP(flag) \
do { \
capval = (flag); \
cap_flag_value_t curval; \
capval = (flag); \
err = cap_get_flag(curcaps, capval, CAP_PERMITTED, &curval); \
if (err != -1 && curval) { \
err = cap_set_flag(caps, CAP_EFFECTIVE, 1, &capval, CAP_SET); \