002-httpconn-isnan.patch 773 B

1234567891011121314151617181920
  1. --- shellinabox-2.10.orig/libhttp/httpconnection.c 2015-09-25 10:55:38.350974827 +0000
  2. +++ shellinabox-2.10/libhttp/httpconnection.c 2015-09-25 10:56:23.462944723 +0000
  3. @@ -69,6 +69,17 @@
  4. #define max(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b); \
  5. _a > _b ? _a : _b; })
  6. +#undef isnan
  7. +#ifndef isnan
  8. +# define isnan(x) \
  9. + (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
  10. + : sizeof (x) == sizeof (double) ? isnan_d (x) \
  11. + : isnan_f (x))
  12. +static inline int isnan_f (float x) { return x != x; }
  13. +static inline int isnan_d (double x) { return x != x; }
  14. +static inline int isnan_ld (long double x) { return x != x; }
  15. +#endif
  16. +
  17. #include "libhttp/httpconnection.h"
  18. #include "logging/logging.h"