#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
-#include "php_libsodium.h"
#include "zend_exceptions.h"
#include <sodium.h>
+#include "php_libsodium.h"
+
#include <stdint.h>
#define PHP_SODIUM_ZSTR_TRUNCATE(zs, len) do { ZSTR_LEN(zs) = (len); } while(0)
PHP_FUNCTION(sodium_memcmp);
PHP_FUNCTION(sodium_memzero);
+#ifndef crypto_kx_BYTES
#define crypto_kx_BYTES crypto_scalarmult_BYTES
+#endif
+#ifndef crypto_kx_PUBLICKEYBYTES
#define crypto_kx_PUBLICKEYBYTES crypto_scalarmult_SCALARBYTES
+#endif
+#ifndef crypto_kx_SECRETKEYBYTES
#define crypto_kx_SECRETKEYBYTES crypto_scalarmult_SCALARBYTES
+#endif
#endif /* PHP_LIBSODIUM_H */