-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
-#if defined(__sun__) || defined(__sun)
-#include <sys/sockio.h>
-#endif
-#ifndef __CYGWIN__
#include <sys/syscall.h>
-#endif
/*
* Functions to get network interfaces info
int rc;
int option = nagle ? 0 : 1;
-#if defined(__sun__) || defined(__sun)
rc = setsockopt(sock->s_fd,
IPPROTO_TCP, TCP_NODELAY, &option, sizeof(option));
-#else
- rc = setsockopt(sock->s_fd,
- SOL_TCP, TCP_NODELAY, &option, sizeof(option));
-#endif
-
if (rc != 0) {
rc = -errno;
CERROR ("Cannot set NODELAY socket option\n");