fritzprix / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Debian x86_64 Glibc 2.13 confliction #499

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build gperftools on this platform

What is the expected output? What do you see instead?
Compiling error:
/src/base/linuxthreads.cc:312:22: error: assigning to 'void (*)(int, struct 
siginfo *, void *)' from incompatible type 'void (int, siginfo_t *, void *)': 
type mismatch at 2nd parameter ('struct siginfo *' vs 'siginfo_t *') 
    sa.sa_sigaction_ = SignalHandler;
                     ^ ~~~~~~~~~~~~~
1 error generated.
What version of the product are you using? On what operating system?
2.0, Debian x86_64 Glibc 2.13, clang-3.2, gcc-4.6

sa is a struct kernel_sigaction, the type of sa_sigaction_ is void (*)(int, 
struct siginfo *, void *), but the type of SignalHandler is void (int, 
siginfo_t *, void *).

On may platform, such as my suse 10 and ubuntu 12.04, the siginfo_t declared in 
/usr/include/bits/siginfo.h is:
typedef struct siginfo {
...
} siginfo_t;
See 
http://repo-genesis3.cbi.utsa.edu/crossref/ns-sli/usr/include/bits/siginfo.h.htm
l

But on this platform, siginfo_t is declared in 
/usr/include/linux_x86_64_gnu/bits/siginfo.h with out tag name.
typedef struct {
...
} siginfo_t;
see http://code.woboq.org/kde/include/bits/siginfo.h.html

the type struct kernel_sigaction is declared in linux_syscall_support.h,
which has already included <signal.h>, siginfo_t is available, so use opaque 
declaration of 'struct siginfo' can be removed.

Please provide any additional information below.
I'v modified and tested, see the attachment.

Original issue reported on code.google.com by chen3feng on 20 Feb 2013 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by chen3feng on 20 Feb 2013 at 3:39

Attachments:

GoogleCodeExporter commented 9 years ago
This was fixed in r176.

Original comment by zatr...@gmail.com on 23 Feb 2013 at 2:07

GoogleCodeExporter commented 9 years ago
Thinks, expect new release.

Original comment by chen3feng on 23 Feb 2013 at 4:49

GoogleCodeExporter commented 9 years ago
dupe of issue 485.

Original comment by vapier@chromium.org on 2 Mar 2013 at 9:12

GoogleCodeExporter commented 9 years ago

Original comment by chapp...@gmail.com on 10 Mar 2013 at 8:32