1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
1998-01-24  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/net/if.h (ifr_bandwidth, ifr_qlen):
	Added to follow latest kernel development.

1998-01-24 15:13  Ulrich Drepper  <drepper@happy.cygnus.com>
This commit is contained in:
Ulrich Drepper
1998-01-24 12:08:37 +00:00
parent 2f954871a4
commit ecb9d3e182
4 changed files with 43 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/* Services file parser in nss_files module.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,8 +39,8 @@ LINE_PARSER
#include GENERIC
DB_LOOKUP (servbyname, 2 + strlen (name) + strlen (proto),
(".%s/%s", name, proto),
DB_LOOKUP (servbyname, 2 + strlen (name) + (proto ? strlen (proto) : 0),
(".%s/%s", name, proto ?: ""),
{
/* Must match both protocol (if specified) and name. */
if (proto != NULL && strcmp (result->s_proto, proto))
@@ -49,10 +49,12 @@ DB_LOOKUP (servbyname, 2 + strlen (name) + strlen (proto),
},
const char *name, const char *proto)
DB_LOOKUP (servbyport, 21 + strlen (proto), ("=%d/%s", port, proto),
DB_LOOKUP (servbyport, 21 + (proto ? strlen (proto) : 0),
("=%d/%s", ntohs (port), proto ?: ""),
{
/* Must match both port and protocol. */
if (result->s_port == port
&& strcmp (result->s_proto, proto) == 0)
if (result->s_port == ntohs (port)
&& (proto == NULL
|| strcmp (result->s_proto, proto) == 0))
break;
}, int port, const char *proto)