mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-06 01:02:26 +01:00
52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
--- mg-20110905.orig/fileio.c
|
|
+++ mg-20110905/fileio.c
|
|
@@ -570,7 +570,7 @@
|
|
#if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */
|
|
if (strlen(dent->d_name) < len
|
|
|| memcmp(cp, dent->d_name, len) != 0)
|
|
-#elif defined (__GLIBC__) /* Linux uses reclen instead. */
|
|
+#elif defined (__linux__) /* Linux uses reclen instead. */
|
|
if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0)
|
|
#else
|
|
if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0)
|
|
--- mg-20110905.orig/sysdef.h
|
|
+++ mg-20110905/sysdef.h
|
|
@@ -20,15 +20,13 @@
|
|
|
|
/* necesarry to get asprintf & friends with glibc XXX doesn't work for some
|
|
* mysterious reason! */
|
|
-#ifdef __GLIBC__
|
|
-# define _GNU_SOURCE
|
|
-# define __USE_GNU
|
|
-#endif
|
|
+#define _GNU_SOURCE
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
+#include <fcntl.h>
|
|
#include <errno.h>
|
|
#include <signal.h>
|
|
|
|
--- mg-20110905.orig/theo.c
|
|
+++ mg-20110905/theo.c
|
|
@@ -218,14 +218,14 @@
|
|
{
|
|
const char *str;
|
|
int len;
|
|
- uint random;
|
|
+ unsigned int random;
|
|
#ifndef HAVE_ARC4RANDOM
|
|
struct timeval tv[2];
|
|
|
|
gettimeofday(&tv[0], NULL);
|
|
- random = (uint)tv[0].tv_usec;
|
|
+ random = (unsigned int)tv[0].tv_usec;
|
|
#else
|
|
- random = (uint)arc4random();
|
|
+ random = (unsigned int)arc4random();
|
|
#endif
|
|
|
|
str = talk[random % ntalk];
|