Page MenuHome GnuPG

gnupg: GPG_ERR_SOURCE_DEFAULT should be defined
Closed, ResolvedPublic

Description

I found a typo (of ten years):

diff --git a/common/init.h b/common/init.h
index 3a5becaeb..a7ec3e0d8 100644
--- a/common/init.h
+++ b/common/init.h
@@ -32,7 +32,7 @@
 
 #ifndef GPG_ERR_SOURCE_DEFAULT
 # error GPG_ERR_SOURCE_DEFAULT is not defined
-#elseif GPG_ERR_SOURCE_DEFAULT == GPG_ERR_SOURCE_UNKNOWN
+#elif GPG_ERR_SOURCE_DEFAULT == GPG_ERR_SOURCE_UNKNOWN
 # error GPG_ERR_SOURCE_DEFAULT has default value
 #endif

But introducing this fix will reveal the errors, because some application don't define GPG_ERR_SOURCE_DEFAULT correctly.
So, before the fix, we need to fix erroneous applications.