X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-setsockopt.c;h=323b8e781166b199367ee388142709b198241579;hb=5191b3546cfb6c163228c23f214e325ddf60d46f;hp=7a16cfa1d95cbe1469c8d5630caab0129f57e919;hpb=626d2fd14cffbb97fec4404a09dbb84e652c661b;p=gnulib.git diff --git a/tests/test-setsockopt.c b/tests/test-setsockopt.c index 7a16cfa1d..323b8e781 100644 --- a/tests/test-setsockopt.c +++ b/tests/test-setsockopt.c @@ -1,5 +1,5 @@ /* Test setsockopt() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t)); #include +#include #include "sockets.h" #include "macros.h" @@ -29,7 +30,7 @@ SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t)); int main (void) { - gl_sockets_startup (SOCKETS_1_1); + (void) gl_sockets_startup (SOCKETS_1_1); /* Test behaviour for invalid file descriptors. */ { @@ -43,6 +44,7 @@ main (void) { int value = 1; + close (99); errno = 0; ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value)) == -1);