ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

libressl-glibc.patch (820B)


      1 --- crypto/compat/issetugid_linux.c.old
      2 +++ crypto/compat/issetugid_linux.c
      3 @@ -4,7 +4,9 @@
      4   */
      5  
      6  #include <errno.h>
      7 +#ifdef __GLIBC__
      8  #include <gnu/libc-version.h>
      9 +#endif
     10  #include <string.h>
     11  #include <sys/types.h>
     12  #include <unistd.h>
     13 @@ -19,7 +21,6 @@
     14  
     15  int issetugid(void)
     16  {
     17 -#ifdef HAVE_GETAUXVAL
     18  	/*
     19  	 * The API for glibc < 2.19 does not indicate if there is an error with
     20  	 * getauxval. While it should not be the case that any 2.6 or greater
     21 @@ -33,14 +34,19 @@
     22  	 * info: http://lwn.net/Articles/519085/
     23  	 *
     24  	 */
     25 +#ifdef __GLIBC__
     26  	const char *glcv = gnu_get_libc_version();
     27  	if (strverscmp(glcv, "2.19") >= 0) {
     28 +#endif
     29 +#ifdef HAVE_GETAUXVAL
     30  		errno = 0;
     31  		if (getauxval(AT_SECURE) == 0) {
     32  			if (errno != ENOENT) {
     33  				return 0;
     34  			}
     35  		}
     36 +#endif
     37 +#ifdef __GLIBC__
     38  	}
     39  #endif
     40  	return 1;