diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c
index 0387e2c308dbb46a440949145f5e32670b18235f..d5853bb12a704b42c93bccd4c41f5942bd4f28fe 100644
--- a/gtests/net/packetdrill/run_system_call.c
+++ b/gtests/net/packetdrill/run_system_call.c
@@ -262,6 +262,7 @@ static int get_s16(struct expression *expression,
 }
 #endif
 
+#ifdef SPP_DSCP
 /* Sets the value from the expression argument, checking that it is a
  * valid u8, and matches the expected type. Returns STATUS_OK on
  * success; on failure returns STATUS_ERR and sets error message.
@@ -281,6 +282,7 @@ static int get_u8(struct expression *expression,
         *value = expression->value.num;
         return STATUS_OK;
 }
+#endif
 
 #if 0
 /* Sets the value from the expression argument, checking that it is a