ports/172574: [patch] mail/mail2sms: fix build with clang

Boris Samorodov bsam at FreeBSD.org
Wed Oct 10 22:58:20 UTC 2012


>Number:         172574
>Category:       ports
>Synopsis:       [patch] mail/mail2sms: fix build with clang
>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:   Wed Oct 10 22:58:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Boris Samorodov
>Release:        FreeBSD 9-STABLE
>Organization:
BSDprint
>Environment:
FreeBSD srv.bb.tel.ru 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #5 r241393: Wed Oct 10 12:27:20 SAMT 2012     bsam at srv.bb.tel.ru:/usr/obj/usr/src/sys/BB  i386
>Description:
Currently the port does not build with clang:
-----
===>  Building for mail2sms-1.3.5
cc -c -O2 -pipe -fno-strict-aliasing -DHAVE_CONFIG_H base64.c
cc -c -O2 -pipe -fno-strict-aliasing -DHAVE_CONFIG_H parse.c
parse.c:151:17: warning: implicit declaration of function 'base64Decode' is parse.c:329:5: error: non-void function 'process' should return a value [-Wreturn-type]
    return; /* add error code */
-----
% uname -a
FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #36 r241156: Wed Oct  3 13:44:36 SAMT 2012     bsam at bsam.wart.ru:/usr/obj/usr/src/sys/BBX  i386

% clang --version
FreeBSD clang version 3.2 (trunk 162107) 20120817
Target: i386-unknown-freebsd10.0
Thread model: posix
-----
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: files/patch-aa
===================================================================
--- files/patch-aa	(revision 305677)
+++ files/patch-aa	(working copy)
@@ -23,6 +23,15 @@
  {
    int nlen = strlen(needle);
    int hlen = strlen(haystack);
+@@ -325,7 +326,7 @@ struct body * process(char *mbox,    /*
+   if (use_stdin || !mbox || !strcasecmp(mbox, "NONE"))
+     fp = stdin;
+   else if ((fp = fopen(mbox, "r")) == NULL) {
+-    return; /* add error code */
++    return -1; /* add error code */
+   }
+
+   isinheader = 1;
 --- mail2sms.1.orig	Wed Apr 16 05:22:01 2003
 +++ mail2sms.1	Wed Apr 16 05:22:57 2003
 @@ -32,7 +32,7 @@


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


More information about the freebsd-ports-bugs mailing list