pkgsrc/devel/sfio/patches/patch-ae
itojun 6762647bed update from 1998 release to 1999 release.
no changelog available from master distribution.  from "diff", 1998 -> 1999
contains minor changes only.

add comments into Makefile; (1) sendmail wants 1999 release, not 2000 release,
(2) master distribution license (need to sign but redistribution is granted).
2000-08-13 17:42:22 +00:00

25 lines
635 B
Text

$NetBSD: patch-ae,v 1.3 2000/08/13 17:42:24 itojun Exp $
Avoid compiler warning.
--- src/lib/sfio/sfwr.c.orig Fri Jul 30 23:58:33 1999
+++ src/lib/sfio/sfwr.c Mon Aug 14 01:58:54 2000
@@ -16,4 +16,5 @@
#endif
-{ reg char *sp, *wbuf, *endbuf;
+{ reg char *wbuf, *endbuf;
reg ssize_t s, w, wr;
+ char *sp;
@@ -32,3 +33,6 @@
{ /* check byte at a time until int-aligned */
- while(((ulong)sp)%sizeof(int))
+ Sfulong_t dumbo;
+
+ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
+ while(dumbo % sizeof(int) != 0)
{ if(*sp != 0)
@@ -36,2 +40,3 @@
sp += 1;
+ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
}