Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Compilation failure - privileges.c: In function 'relinquish_

From: Evan Huus <eapache@xxxxxxxxx>
Date: Mon, 20 Aug 2012 16:11:37 -0400
On Mon, Aug 20, 2012 at 3:49 PM, Kaul <mykaul@xxxxxxxxx> wrote:
> Recently (~2 days or so ago?), I've failed to compile wireshark, on F17/x64:
>
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I./.. -DINET6
> -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE
> -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES
> "-D_U_=__attribute__((unused))" -D_FORTIFY_SOURCE=2 -I/usr/local/include
> -DPLUGIN_DIR=\"/usr/local/lib/wireshark/plugins/1.9.0\" -Werror -g -O2 -Wall
> -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith
> -Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security
> -Wold-style-definition -Wno-error=unused-but-set-variable
> -fexcess-precision=fast -pthread -I/usr/include/gtk-2.0
> -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -MT
> privileges.lo -MD -MP -MF .deps/privileges.Tpo -c privileges.c  -fPIC -DPIC
> -o .libs/privileges.o
> privileges.c: In function 'relinquish_special_privs_perm':
> privileges.c:275:12: error: ignoring return value of 'setresgid', declared
> with attribute warn_unused_result [-Werror=unused-result]
> privileges.c:282:12: error: ignoring return value of 'setresuid', declared
> with attribute warn_unused_result [-Werror=unused-result]
> cc1: all warnings being treated as errors
>
>
>
> If it were git, I'm sure I could easily use 'git bisect' and find the issue.
> Without it, I'm really unsure - as the last change to this file took place
> some time ago.

We do have a read-only git mirror at [1].

If the last change to the file happened a while ago (presumably long
before the issue started appearing) then it's likely your toolchain
changed recently. Did you install a gcc or libc update in the last
couple of days?

Not that it isn't our fault (assuming the warning isn't a false
positive), it's just likely that only the most recent gcc/libc
toolchain will warn on the problem.

Thanks for the report,
Evan

[1] http://code.wireshark.org/git/wireshark