OSDN Git Service

Check size of off_t type in SConscript.
[android-x86/external-exfat.git] / SConstruct
index 97cbebb..30e5208 100644 (file)
@@ -74,6 +74,13 @@ if not env.GetOption('clean'):
                conf.env.Append(CPPPATH = ['/usr/local/include'])
                conf.env.Append(LIBPATH = ['/usr/local/lib'])
 
+       if not conf.CheckTypeSize('off_t', '#include <sys/types.h>', 'C', 8):
+               print '''
+       The size of off_t type must be 64 bits. File systems larger than
+       2 GB will be corrupted with 32-bit off_t.
+'''
+               Exit(1)
+
        env = conf.Finish()