pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/fortune



Module Name:    pkgsrc
Committed By:   tnn
Date:           Mon Jun 28 11:20:55 UTC 2021

Modified Files:
        pkgsrc/games/fortune: distinfo
        pkgsrc/games/fortune/patches: patch-fortune_fortune.c

Log Message:
fortune: fix build on Linux


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/games/fortune/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/games/fortune/patches/patch-fortune_fortune.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/fortune/distinfo
diff -u pkgsrc/games/fortune/distinfo:1.1 pkgsrc/games/fortune/distinfo:1.2
--- pkgsrc/games/fortune/distinfo:1.1   Mon Aug  7 11:10:32 2017
+++ pkgsrc/games/fortune/distinfo       Mon Jun 28 11:20:55 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+$NetBSD: distinfo,v 1.2 2021/06/28 11:20:55 tnn Exp $
 
 SHA1 (fortune-mod-9708.tar.gz) = 9f96a00dbf5d2c6b0e7324af0eae988ce6adc5ad
 RMD160 (fortune-mod-9708.tar.gz) = bf40efcfde2e854166bccdbccf7cf23bfb443e61
@@ -8,5 +8,5 @@ SHA1 (patch-Makefile) = b2429bba09ffdc7d
 SHA1 (patch-datfiles_Makefile) = fd0d1b87bd2532bada57517970cf7676ee678720
 SHA1 (patch-datfiles_html_Makefile) = aef5d7d6275943e94e4f79f2db64445605d329ce
 SHA1 (patch-datfiles_off_Makefile) = 31aa90703d86df0c1d50e5cadfb0ec92a5800199
-SHA1 (patch-fortune_fortune.c) = 734f7c2bd5ebfc3c8d28148e0674bccacdccfc1f
+SHA1 (patch-fortune_fortune.c) = b19d3af94f2708012f36ca1739b85a7ce5c97ed0
 SHA1 (patch-util_strfile.h) = dd58d46bf13f5a7eeb245a3b747a26fa1e946113

Index: pkgsrc/games/fortune/patches/patch-fortune_fortune.c
diff -u pkgsrc/games/fortune/patches/patch-fortune_fortune.c:1.1 pkgsrc/games/fortune/patches/patch-fortune_fortune.c:1.2
--- pkgsrc/games/fortune/patches/patch-fortune_fortune.c:1.1    Mon Aug  7 11:10:32 2017
+++ pkgsrc/games/fortune/patches/patch-fortune_fortune.c        Mon Jun 28 11:20:55 2021
@@ -1,10 +1,10 @@
-$NetBSD: patch-fortune_fortune.c,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+$NetBSD: patch-fortune_fortune.c,v 1.2 2021/06/28 11:20:55 tnn Exp $
 
 Make fortune compatible with BSD strfile datfiles.
 
 --- fortune/fortune.c.orig     1997-08-28 19:43:52.000000000 +0000
 +++ fortune/fortune.c
-@@ -142,6 +142,15 @@ static char rcsid[] = "$NetBSD: fortune.
+@@ -142,6 +142,20 @@ static char rcsid[] = "$NetBSD: fortune.
  #define       NDEBUG  1
  #endif
  
@@ -15,12 +15,17 @@ Make fortune compatible with BSD strfile
 +#elif defined __sun
 +#define BE32TOH(x) x = BE_IN32(&(x))
 +#define BE64TOH(x) x = BE_IN64(&(x))
++#elif defined __linux__
++#define _BSD_SOURCE
++#include <endian.h>
++#define BE32TOH(x) x = be32toh(x)
++#define BE64TOH(x) x = be64toh(x)
 +#endif
 +
  typedef struct fd
  {
      int percent;
-@@ -925,10 +934,10 @@ void get_tbl(FILEDESC * fp)
+@@ -925,10 +939,10 @@ void get_tbl(FILEDESC * fp)
            exit(1);
        }
        /* fp->tbl.str_version = ntohl(fp->tbl.str_version); */
@@ -35,7 +40,7 @@ Make fortune compatible with BSD strfile
        close(fd);
      }
      else
-@@ -1098,8 +1107,8 @@ void get_fort(void)
+@@ -1098,8 +1112,8 @@ void get_fort(void)
      lseek(fp->datfd,
          (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), 0);
      read(fp->datfd, Seekpts, sizeof Seekpts);



Home | Main Index | Thread Index | Old Index