Quellcode durchsuchen

fix building under Solaris

Ralf S. Engelschall vor 24 Jahren
Ursprung
Commit
46e90d6f60
2 geänderte Dateien mit 42 neuen und 2 gelöschten Zeilen
  1. 37 0
      ssmtp/ssmtp.patch
  2. 5 2
      ssmtp/ssmtp.spec

+ 37 - 0
ssmtp/ssmtp.patch

@@ -0,0 +1,37 @@
+--- ssmtp.c.orig	2002-08-21 13:36:01.000000000 +0200
++++ ssmtp.c	2002-08-21 13:36:01.000000000 +0200
+@@ -18,6 +18,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <pwd.h>
++#include <netdb.h>
+ 
+ #include <syslog.h>
+ #include <signal.h>
+@@ -123,7 +124,7 @@
+ 		if((sd = strdup(buf)) == NULL) {
+ 			die("strup() failed in get_addr()");
+ 		}
+-		while(*sd && isspace(*sd)) sd++;
++		while(*sd && isspace((int)(*sd))) sd++;
+ 
+ 		if(strncpy(buf, sd, sz) == NULL) {
+ 			die("strncpy() failed in get_addr()");
+@@ -132,7 +133,7 @@
+ 		/* Strip trailing spaces */
+ 		i = strlen(buf);
+ 		while(i-- > 0) {
+-			if(isspace(buf[i]) == 0) break;
++			if(isspace((int)buf[i]) == 0) break;
+ 		}
+ 		buf[(i + 1)] = (char)NULL;
+ 	}
+@@ -171,7 +172,7 @@
+ 				*p = (char)NULL;
+ 			}
+ 
+-			while(*str && isspace(*str)) str++;
++			while(*str && isspace((int)(*str))) str++;
+ 			get_addr(str, buf, BUF_SZ);
+ 
+ 			str = (p + 1);

+ 5 - 2
ssmtp/ssmtp.spec

@@ -33,11 +33,12 @@ Distribution: OpenPKG [BASE]
 Group:        Mail
 License:      GPL
 Version:      2.48
-Release:      20020820
+Release:      20020821
 
 #   list of sources
 Source0:      ftp://metalab.unc.edu/pub/Linux/system/mail/mta/ssmtp-%{version}.tar.gz
 Source1:      ssmtp.conf
+Patch0:       ssmtp.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -58,7 +59,9 @@ Conflicts:    sendmail, exim, postfix
     one.
 
 %prep
-    %setup -q
+    %setup0 -q
+    rm -rf RCS
+    %patch0 -p0
     rm config.cache
 
 %build