Bug 178251 - [patch] converters/unix2dos implicit declaration of function exit
Summary: [patch] converters/unix2dos implicit declaration of function exit
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 08:40 UTC by Chad Slater
Modified: 2014-01-27 21:50 UTC (History)
0 users

See Also:


Attachments
file.diff (269 bytes, patch)
2013-04-30 08:40 UTC, Chad Slater
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Slater 2013-04-30 08:40:00 UTC
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

Fix: Trivial fix is to simply add #include <stdlib.h> to unix2dos.c.  Do not know who owns upstream.

Patch attached with submission follows:
How-To-Repeat: Using clang as the compiler, install the converters/unix2dos port.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-30 14:39:04 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-30 14:39:04 UTC
Maintainer of converters/unix2dos,

Please note that PR ports/178251 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/178251

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2014-01-27 21:43:44 UTC
State Changed
From-To: feedback->closed


Committed, thanks! 



Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2014-01-27 21:43:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->thierry


Take it.
Comment 5 dfilter service freebsd_committer freebsd_triage 2014-01-27 21:46:55 UTC
Author: thierry
Date: Mon Jan 27 21:46:48 2014
New Revision: 341459
URL: http://svnweb.freebsd.org/changeset/ports/341459
QAT: https://qat.redports.org/buildarchive/r341459/

Log:
  Fix an implicit declaration of the exit function.
  
  PR:		ports/178251
  Submitted by:	Chad Slater <chad.slater (at) gmail.com>
  Approved by:	maintainer time-out (8 months)

Added:
  head/converters/unix2dos/files/
  head/converters/unix2dos/files/patch-unix2dos.c   (contents, props changed)

Added: head/converters/unix2dos/files/patch-unix2dos.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/converters/unix2dos/files/patch-unix2dos.c	Mon Jan 27 21:46:48 2014	(r341459)
@@ -0,0 +1,8 @@
+--- unix2dos.c.orig	2001-05-23 01:58:39.000000000 +0200
++++ unix2dos.c	2014-01-27 22:41:13.000000000 +0100
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/types.h>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"