Skip to contentSkip to conversation

Fix configure test for PBKDF2 in nettle

PATCH Applied Steven Luo 3 participants 3 messages May 27, 2016 – May 31, 2016

lore
Share & tools
lore

Steven Luo

author
#0 lore raw

PATCH 1/1 Fix configure test for PBKDF2 in nettle

From: Steven Luo <[email protected]>

On my Debian jessie system, including nettle/pbkdf2.h does not cause NULL to be defined, which causes the test to fail to compile. Include stddef.h to bring in a definition of NULL.

---
I suppose this could also be fixed by defining NULL ourselves, or by replacing NULLs with 0s -- if one of those other approaches is preferred, let me know.

 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index c37fc5f..0aae017 100755
@@ -2342,6 +2342,7 @@ if test "$nettle" != "no"; then
         nettle="yes"
 
         cat > $TMPC << EOF
+#include <stddef.h>
 #include <nettle/pbkdf2.h>
 int main(void) {
      pbkdf2_hmac_sha256(8, NULL, 1000, 8, NULL, 8, NULL);
Signature · 1 line
2.1.4
#2 lore raw
In reply to Steven Luo
Quoted 6 lines · Steven Luo

From: Steven Luo <[email protected]>

On my Debian jessie system, including nettle/pbkdf2.h does not cause NULL to be defined, which causes the test to fail to compile. Include stddef.h to bring in a definition of NULL.

Quoted 7 lines

---
I suppose this could also be fixed by defining NULL ourselves, or by replacing NULLs with 0s -- if one of those other approaches is preferred, let me know.

What you've done here looks just fine to me.

Quoted 19 lines
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index c37fc5f..0aae017 100755
@@ -2342,6 +2342,7 @@ if test "$nettle" != "no"; then
         nettle="yes"
 
         cat > $TMPC << EOF
+#include <stddef.h>
 #include <nettle/pbkdf2.h>
 int main(void) {
      pbkdf2_hmac_sha256(8, NULL, 1000, 8, NULL, 8, NULL);
Signature · 1 line
2.1.4

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|