--- a/gphoto2/foreach.c
+++ b/gphoto2/foreach.c
@@ -31,6 +31,8 @@
 
 #include <gphoto2/gphoto2-port-log.h>
 
+#define GP_DEBUG (void)
+
 #define GP_ERROR_FRONTEND_BAD_ID -10000
 #define CR(result) {int __r=(result); if(__r<0) return(__r);}
 #define CL(result,list) {int __r=(result); if(__r<0) {gp_list_free(list);return(__r);}}
