mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
Fix possible AIX problem with sysconf in rndunix.
* cipher/rndunix.c [HAVE_STDINT_H]: Include stdint.h. (start_gatherer): Detect misbehaving sysconf. -- See GnuPG-bug-id: 1778 for the reason of this patch. There is no concrete bug report but this chnage should not harm. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e26706700f
commit
a38dffde7b
@ -50,6 +50,9 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_STDINT_H
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@ -706,6 +709,12 @@ start_gatherer( int pipefd )
|
|||||||
nmax = 20; /* assume a reasonable value */
|
nmax = 20; /* assume a reasonable value */
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
/* AIX returns INT32_MAX instead of a proper value. We assume that
|
||||||
|
* this is always an error and use a reasonable value. */
|
||||||
|
# ifdef INT32_MAX
|
||||||
|
if (nmax == INT32_MAX)
|
||||||
|
nmax = 20;
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
nmax = 20; /* assume a reasonable value */
|
nmax = 20; /* assume a reasonable value */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user