ports/178251: [patch] unix2dos implicit declaration of function exit

Chad Slater chad.slater at gmail.com
Tue Apr 30 07:40:00 UTC 2013


>Number:         178251
>Category:       ports
>Synopsis:       [patch] unix2dos implicit declaration of function exit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 30 07:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Chad Slater
>Release:        FreeBSD 9.1-RELEASE
>Organization:
>Environment:
FreeBSD babh 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Sat Mar 30 17:51:04 EDT 2013     root at avenger:/usr/obj/pcbsd-build64/fbsd-source/src-patched/sys/GENERIC  amd64
>Description:
When installing the unix2dos port, clang warns on implicit declaration of the exit function.

clang -O2 -pipe  -o unix2dos unix2dos.c
unix2dos.c:59:5: warning: implicitly declaring library function 'exit' with t
    exit(1);
    ^
unix2dos.c:59:5: note: please include the header <stdlib.h> or explicitly pro
1 warning generated.
ln -f unix2dos dos2unix


>How-To-Repeat:
Using clang as the compiler, install the converters/unix2dos port.
>Fix:
Trivial fix is to simply add #include <stdlib.h> to unix2dos.c.  Do not know who owns upstream.

Patch attached with submission follows:

--- /usr/ports/converters/unix2dos/work/unix2dos.c	2013-04-30 00:52:42.277855431 -0600
+++ unix2dos/unix2dos.c	2013-04-30 01:28:49.207854523 -0600
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list