From nobody@FreeBSD.org  Wed May 16 08:00:20 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 1F55416A477
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:00:20 +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 10DED13C44B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:00:20 +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 l4G80Jxa000961
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2007 08:00:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l4G7tHbk099701;
	Wed, 16 May 2007 07:55:17 GMT
	(envelope-from nobody)
Message-Id: <200705160755.l4G7tHbk099701@www.freebsd.org>
Date: Wed, 16 May 2007 07:55:17 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:         112704
>Category:       kern
>Synopsis:       [patch] SCTP related symbols aren't exported
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rrs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 08:10:04 GMT 2007
>Closed-Date:    Tue Jun 12 13:15:24 GMT 2007
>Last-Modified:  Tue Jun 12 13:15:24 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:
Responsible-Changed-From-To: freebsd-bugs->rrs 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed May 16 14:19:45 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112704 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/112704: commit references a PR
Date: Wed, 16 May 2007 20:21:02 +0000 (UTC)

 rrs         2007-05-16 20:20:54 UTC
 
   FreeBSD src repository
 
   Modified files:
     lib/libc/net         Symbol.map 
   Log:
    Resolves symbols map so sctp_xxx() functions are included.
   PR:             112704
   Submitted by:   kou@cozmixng.org
   
   Revision  Changes    Path
   1.10      +14 -0     src/lib/libc/net/Symbol.map
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: rrs 
State-Changed-When: Tue Jun 12 13:14:38 UTC 2007 
State-Changed-Why:  
The fix is committed... so here is my first attempt to figure out 
how to close a PR ;-0 


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