diff options
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | loader/ldt_keeper.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -3590,6 +3590,11 @@ _sysi86=no cc_check && _sysi86=yes if test "$_sysi86" = yes ; then _def_sysi86='#define HAVE_SYSI86 1' + cat > $TMPC << EOF + #include <sys/sysi86.h> + int main (void) { int sysi86(int, void*); sysi86(0); return 0; } +EOF + cc_check && _def_sysi86_iv='#define HAVE_SYSI86_iv 1' else _def_sysi86='#undef HAVE_SYSI86' fi @@ -7932,6 +7937,7 @@ int setenv(const char *name, const char *val, int overwrite); /* Define this if your system has sysi86 */ $_def_sysi86 +$_def_sysi86_iv /* Define this if your system has pthreads */ $_def_pthreads diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index ec2de5dbd0..cc0b2393bc 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -62,8 +62,8 @@ int modify_ldt(int func, void *ptr, unsigned long bytecount); #include <sys/segment.h> #include <sys/sysi86.h> -/* solaris x86: add missing prototype for sysi86() */ -#ifdef HAVE_SYSI86 +/* solaris x86: add missing prototype for sysi86(), but only when sysi86(int, void*) is known to be valid */ +#ifdef HAVE_SYSI86_iv #ifdef __cplusplus extern "C" { #endif |