diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c
index 0c49ce36b0dcab481034b246540724f893414905..ff6e870b7c533c1bdda503767e002c4bf3f4e300 100644
--- a/libavcodec/ppc/dsputil_altivec.c
+++ b/libavcodec/ppc/dsputil_altivec.c
@@ -1302,6 +1302,7 @@ POWERPC_PERF_STOP_COUNT(altivec_put_no_rnd_pixels16_xy2_num, 1);
 #endif /* ALTIVEC_USE_REFERENCE_C_CODE */
 }
 
+#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 330)
 int hadamard8_diff8x8_altivec(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t *src, int stride, int h){
 POWERPC_PERF_DECLARE(altivec_hadamard8_diff8x8_num, 1);
   int sum;
@@ -1611,6 +1612,7 @@ POWERPC_PERF_START_COUNT(altivec_hadamard8_diff16_num, 1);
 POWERPC_PERF_STOP_COUNT(altivec_hadamard8_diff16_num, 1);
   return score;
 }
+#endif
 
 int has_altivec(void)
 {
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index b70de732898eb20653a7b5a36f0d8aa8659b3136..55a4587f95bb4ee273213c1bab1fe98166e94276 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -279,8 +279,10 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
         
 	c->gmc1 = gmc1_altivec;
 
+#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 330)
 	c->hadamard8_diff[0] = hadamard8_diff16_altivec;
 	c->hadamard8_diff[1] = hadamard8_diff8x8_altivec;
+#endif
 
 #ifdef CONFIG_ENCODERS
 	if (avctx->dct_algo == FF_DCT_AUTO ||