diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 26cb67661e58b0a911d47740c806d8777e856300..e6a2f42ee39fae89cd8763f80e4410b91f03c4f2 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -648,10 +648,10 @@ (define-public xl2tpd
                   (delete 'configure) ;no configure script
                   (add-before 'build 'setup-environment
                     (lambda* (#:key inputs #:allow-other-keys)
-                      (setenv "CFLAGS"
-                              (string-append "-DPPPD=\""
-                                             (assoc-ref inputs "ppp")
-                                             "/sbin/pppd\""))
+                      (substitute* "l2tp.h"
+                        (("/usr/sbin/pppd")
+                         (string-append (assoc-ref inputs "ppp")
+                                        "/sbin/pppd")))
                       (setenv "KERNELSRC"
                               (assoc-ref inputs "linux-libre-headers"))
                       #t)))