Fixes/updates to build on linux.

Summary:
a) An update to build-infer.sh to avoid downloading/building 4.02.3
ocaml compiler when it is already present.
b) Add the ifdef to avoid this error on glibc systems:

    clang -c -w libc_basic.c -o libc_basic.o
    libc_basic.c:692:12: error: unknown type name '__WAIT_STATUS'
    pid_t wait(__WAIT_STATUS stat_loc) {
            ^
Closes https://github.com/facebook/infer/pull/429

Reviewed By: akotulski

Differential Revision: D3704604

Pulled By: jvillard

fbshipit-source-id: d557f1b
master
Raghavendra Prabhu 8 years ago committed by Facebook Github Bot 6
parent d594a525ac
commit d9699264e0

@ -683,6 +683,16 @@ unsigned sleep(unsigned seconds) {
#define __WAIT_STATUS int* #define __WAIT_STATUS int*
#endif #endif
// glibc 2.24 did away with 'union wait' and replaced it with int*.
// Hence, we re-define __WAIT_STATUS if glibc is >= 2.24.
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(x, y) 0
#endif
#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 24)
#define __WAIT_STATUS int*
#endif
// the waiting is modeled as skip. Then the return value is a random value of a // the waiting is modeled as skip. Then the return value is a random value of a
// process or // process or
// -1 in case of an error // -1 in case of an error

Loading…
Cancel
Save