Welcome to mirror list, hosted at ThFree Co, Russian Federation.

socklen_t « types « auto - github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 84d39fb0cbcb7b247011b878a88d8d3bf9a8696e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

found=0

echo 'Checking for socklen_t'

echo '#include <sys/types.h>' > autotest.c
echo '#include <sys/socket.h>' >> autotest.c
echo 'int main() { socklen_t i = 0; return 0; }' >> autotest.c

eval "${CC} -o autotest autotest.c > /dev/null 2>&1"

if [ -x autotest ]; then
    echo ' + socklen_t found'
    found=1
else
    echo ' + socklen_t not found'
    echo ' + uint32_t used'
    type='typedef uint32_t  socklen_t;'
    found=2
fi

rm autotest*


if [ $found = 2 ]; then
    echo $type >> ngx_auto_config.h
    echo >> ngx_auto_config.h
fi