ppc: fix build on certain PowerPC variants without Altivec
authorRoland Stigge <stigge@antcom.de>
Sun, 23 Mar 2014 16:29:37 +0000 (09:29 -0700)
committerFiona Glaser <fiona@x264.com>
Tue, 22 Apr 2014 22:37:47 +0000 (15:37 -0700)
common/cpu.c

index d5502ec..837de89 100644 (file)
@@ -338,6 +338,9 @@ uint32_t x264_cpu_detect( void )
 
 uint32_t x264_cpu_detect( void )
 {
+#ifdef __NO_FPRS__
+    return 0;
+#else
     static void (*oldsig)( int );
 
     oldsig = signal( SIGILL, sigill_handler );
@@ -357,6 +360,7 @@ uint32_t x264_cpu_detect( void )
     signal( SIGILL, oldsig );
 
     return X264_CPU_ALTIVEC;
+#endif
 }
 #endif