- # Disregard bad function casts until DPDK is fixed
- CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
- EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
-elif [ $CC != "clang" ]; then
+ if [ "$CC" = "clang" ]; then
+ # Disregard cast alignment errors until DPDK is fixed
+ CFLAGS="$CFLAGS -Wno-cast-align"
+ fi
+ EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=./dpdk-$DPDK_VER/build"
+elif [ "$CC" != "clang" ]; then