~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/test-setsockopt.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Test setsockopt() function.
2
 
   Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 2011-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
22
22
SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t));
23
23
 
24
24
#include <errno.h>
 
25
#include <unistd.h>
25
26
 
26
27
#include "sockets.h"
27
28
#include "macros.h"
43
44
  {
44
45
    int value = 1;
45
46
 
 
47
    close (99);
46
48
    errno = 0;
47
49
    ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value))
48
50
            == -1);