build: Fix conditional compilation on availability of getpass()

Change-Id: I3aa95c1b6afe2239f24642507da8090f7f58abac
Refs: #2419
diff --git a/tools/ndnsec/util.hpp b/tools/ndnsec/util.hpp
index 2de9ff1..eaf2825 100644
--- a/tools/ndnsec/util.hpp
+++ b/tools/ndnsec/util.hpp
@@ -46,7 +46,7 @@
 bool
 getPassword(std::string& password, const std::string& prompt)
 {
-#ifndef NDN_CXX_HAVE_GETPASS
+#ifdef NDN_CXX_HAVE_GETPASS
   bool isReady = false;
 
   char* pw0 = 0;