diff --git a/src/cntlr_map.c b/src/cntlr_map.c
index 4aa48a102390854dc38a86ef00bd470dec4023f5..c026b6e22f280914da5cf290d3759d584c920454 100644
--- a/src/cntlr_map.c
+++ b/src/cntlr_map.c
@@ -3473,6 +3473,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 	uint8_t *frame;
 
 	UNUSED(hashlen);
+	UNUSED(hash);
 
 	if (!validate_proxied_encap_dpp(cmdu, tv)) {
 		dbg("cmdu validation: [PROXIED_ENCAP_DPP] failed\n");
@@ -3557,6 +3558,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 	if (!hash)
 		return -1;
 #endif
+#ifdef USE_LIBDPP
 	switch (frm->type) {
 	case DPP_PA_PRESENCE_ANNOUNCEMENT: {
 		int ret;
@@ -3596,7 +3598,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 		dbg("Unknown frame!\n");
 		break;
 	}
-
+#endif
 
 	return 0;
 }
diff --git a/src/cntlr_ubus.c b/src/cntlr_ubus.c
index 5378dd20716f7d8c94e7d456d5bb274a28839bda..1d3270fa15315d64312cbc1d425b9e0c822d8d5e 100644
--- a/src/cntlr_ubus.c
+++ b/src/cntlr_ubus.c
@@ -886,6 +886,7 @@ static int cntlr_dpp_uri(struct ubus_context *ctx, struct ubus_object *obj,
 	return UBUS_STATUS_OK;
 }
 #endif
+#endif
 
 static int cntlr_steer_summary(struct ubus_context *ctx, struct ubus_object *obj,
 			struct ubus_request_data *req, const char *method,
@@ -3545,10 +3546,8 @@ int cntlr_publish_object(struct controller *c, const char *objname)
 #ifdef USE_LIBDPP
 		UBUS_METHOD("dpp_enrollee_uri", cntlr_dpp_uri,
 				dpp_uri_params),
-		UBUS_METHOD("dpp_enrollee_uri_eth", cntlr_dpp_uri_eth,
-				dpp_uri_params),
 #endif
-#endif /* DPP */
+#endif
 		UBUS_METHOD("steer_summary", cntlr_steer_summary,
 				steer_summary_params),
 		UBUS_METHOD("steer_history", cntlr_steer_history,
diff --git a/src/dpp.c b/src/dpp.c
index df8f9ce24881054954ebc0e9a0e3b31c1e5144a9..ed7222d9dc01e64289e2dea97486d37a76d9fd7b 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -2,6 +2,8 @@
  * Copyright (C) 2023 IOPSYS Software Solutions AB. All rights reserved.
  */
 #if (EASYMESH_VERSION > 2)
+#ifdef USE_LIBDPP
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -46,11 +48,8 @@
 #include "utils/utils.h"
 #include "utils/debug.h"
 #include "utils/dpp_sock.h"
-#if (EASYMESH_VERSION > 2)
-#ifdef USE_LIBDPP
+
 #include <dpp_api.h>
-#endif
-#endif
 
 #include "dpp.h"
 #include <math.h>
@@ -249,7 +248,6 @@ out:
 }
 #endif
 
-#ifdef USE_LIBDPP
 int dpp_frame_handler(void *dpp, uint8_t *smac, enum dpp_event ev,
 		      uint8_t *frame, size_t framelen)
 {
@@ -356,3 +354,4 @@ int dpp_frame_handler(void *dpp, uint8_t *smac, enum dpp_event ev,
 	return 0;
 }
 #endif
+#endif