[vlc-devel] [PATCH] vlc build error with linux kernel headers < 2.6.20

Dmitry Fedorov dm.fedorov at gmail.com
Wed Oct 21 12:17:40 CEST 2009


This vlc build error caused by slightly outdated kernel headers (< 2.6.20):

file.c: In function 'IsRemote':
file.c:141: error: 'AFS_SUPER_MAGIC' undeclared (first use in this function)
file.c:141: error: (Each undeclared identifier is reported only once
file.c:141: error: for each function it appears in.)
make[5]: *** [libaccess_file_plugin_la-file.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I'm binded to Freescale's BSP with outdated 2.6.19.
This patch solves the problem:

--- vlc-1.0.2/modules/access/file.c.orig	2009-09-18 23:37:45.000000000 +0700
+++ vlc-1.0.2/modules/access/file.c	2009-10-21 16:44:30.000000000 +0700
@@ -50,6 +50,9 @@
 #if defined (__linux__)
 #   include <sys/vfs.h>
 #   include <linux/magic.h>
+#   ifndef    AFS_SUPER_MAGIC /* appeared in 2.6.20 kernel */
+#      define AFS_SUPER_MAGIC                0x5346414F
+#   endif
 #elif defined (HAVE_SYS_MOUNT_H)
 #   include <sys/param.h>
 #   include <sys/mount.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-1.0.2_afs-super-magic.patch
Type: text/x-diff
Size: 1121 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091021/d8a714b1/attachment.patch>


More information about the vlc-devel mailing list