diff --git a/res/libresample/src/resample.c b/res/libresample/src/resample.c
index 405bdd9d81fe27ec5b4c38a1042aa3e713a78eb8..9dba5af961c99ceb53ab16be1b077055f4fc9d49 100644
--- a/res/libresample/src/resample.c
+++ b/res/libresample/src/resample.c
@@ -87,7 +87,7 @@ void *resample_open(int highQuality, double minFactor, double maxFactor)
 
    /* Just exit if we get invalid factors */
    if (minFactor <= 0.0 || maxFactor <= 0.0 || maxFactor < minFactor) {
-      #if DEBUG
+      #ifdef DEBUG
       fprintf(stderr,
               "libresample: "
               "minFactor and maxFactor must be positive real numbers,\n"
@@ -187,7 +187,7 @@ int resample_process(void   *handle,
    int Nx;
    int i, len;
 
-   #if DEBUG
+   #ifdef DEBUG
    fprintf(stderr, "resample_process: in=%d, out=%d lastFlag=%d\n",
            inBufferLen, outBufferLen, lastFlag);
    #endif
@@ -197,7 +197,7 @@ int resample_process(void   *handle,
    outSampleCount = 0;
 
    if (factor < hp->minFactor || factor > hp->maxFactor) {
-      #if DEBUG
+      #ifdef DEBUG
       fprintf(stderr,
               "libresample: factor %f is not between "
               "minFactor=%f and maxFactor=%f",
diff --git a/res/libresample/src/resample_defs.h b/res/libresample/src/resample_defs.h
index f1b10d432db96647bd855f4999b428982901b773..a0e7afc370aa9f33989aa33c11f9125305b3414f 100644
--- a/res/libresample/src/resample_defs.h
+++ b/res/libresample/src/resample_defs.h
@@ -20,8 +20,6 @@
 #endif
 #endif
 
-#define DEBUG 0
-
 #ifndef TRUE
 #define TRUE  1
 #endif