From nobody@FreeBSD.org  Wed May 16 08:04:33 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E89C016A400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:04:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id D9D8013C46C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:04:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4G84XpH003623
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:04:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l4G7xVXC000850;
	Wed, 16 May 2007 07:59:31 GMT
	(envelope-from nobody)
Message-Id: <200705160759.l4G7xVXC000850@www.freebsd.org>
Date: Wed, 16 May 2007 07:59:31 GMT
From: Kouhei Sutou<kou@cozmixng.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: SCTP related symbols aren't exported
X-Send-Pr-Version: www-3.0

>Number:         112705
>Category:       misc
>Synopsis:       SCTP related symbols aren't exported
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 08:10:05 GMT 2007
>Closed-Date:    Wed May 16 14:19:01 GMT 2007
>Last-Modified:  Wed May 16 14:19:01 GMT 2007
>Originator:     Kouhei Sutou
>Release:        7.0-CURRENT at 2007/05/16
>Organization:
Japan
>Environment:
FreeBSD letsd.clear-code.com 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed May 16 15:10:34 JST 2007     root@letsd.clear-code.com:/usr/obj/usr/src/sys/SCTP  i386

>Description:
SCTP related function man pages (e.g. sctp_bindx(3)) say that you need to link libc to use SCTP function. But /lib/libc.so.7 doesn't include sctp_* symbols:

  % strings /lib/libc.so.7 | grep sctp
  % # no output

So I can't use sctp_* functions on FreeBSD.
libc.so should export sctp_* symbols like man pages say.

>How-To-Repeat:
sctp-test.c:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>

int
main(int argc, char **argv)
{
  sctp_bindx(0, 0, 0, 0);
  return 0;
}

I can't build sctp-test.c:

  % cc sctp-test.c
  /var/tmp//cctHYOM8.o(.text+0x25): In function `main':
  : undefined reference to `sctp_bindx'


>Fix:
Add sctp_* related functions to src/lib/libc/net/Symbols.map like the attached patch.

Patch attached with submission follows:

--- lib/libc/net/Symbol.map.orig	Wed May 16 16:42:45 2007
+++ lib/libc/net/Symbol.map	Wed May 16 16:40:48 2007
@@ -124,6 +124,20 @@
 	in6addr_loopback;
 	in6addr_nodelocal_allnodes;
 	in6addr_linklocal_allnodes;
+	sctp_getaddrlen;
+	sctp_bindx;
+	sctp_connectx;
+	sctp_peeloff;
+	sctp_opt_info;
+	sctp_getpaddrs;
+	sctp_freepaddrs;
+	sctp_getladdrs;
+	sctp_freeladdrs;
+	sctp_sendmsg;
+	sctp_sendmsgx;
+	sctp_send;
+	sctp_sendx;
+	sctp_recvmsg;
 };
 
 FBSDprivate_1.0 {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Wed May 16 14:19:00 UTC 2007 
State-Changed-Why:  
duplicate of 112704 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112705 
>Unformatted:
