]> git.sesse.net Git - vlc/blobdiff - include/vlc_fixups.h
Android: hack to fix warnings in pthread.h when compiling in C++
[vlc] / include / vlc_fixups.h
index 6f6a6e7cebda7b821bc55ae0b83cd48c4788c85a..02f0dfa50298b4f81f06fda8c8a75d4a263780c7 100644 (file)
@@ -94,12 +94,16 @@ size_t strlcpy (char *, const char *, size_t);
 #endif
 
 #ifndef HAVE_STRTOF
+#ifndef __ANDROID__
 float strtof (const char *, char **);
 #endif
+#endif
 
 #ifndef HAVE_ATOF
+#ifndef __ANDROID__
 double atof (const char *);
 #endif
+#endif
 
 #ifndef HAVE_STRTOLL
 long long int strtoll (const char *, char **, int);
@@ -170,6 +174,11 @@ static inline char *getenv (const char *name)
 }
 #endif
 
+#ifndef HAVE_SETENV
+int setenv (const char *, const char *, int);
+int unsetenv (const char *);
+#endif
+
 /* Alignment of critical static data structures */
 #ifdef ATTRIBUTE_ALIGNED_MAX
 #   define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
@@ -264,7 +273,7 @@ void twalk( const void *root, void(*action)(const void *nodep, VISIT which, int
 void tdestroy( void *root, void (*free_node)(void *nodep) );
 #else // HAVE_SEARCH_H
 # ifndef HAVE_TDESTROY
-void tdestroy( void *root, void (*free_node)(void *nodep) );
+#  define tdestroy vlc_tdestroy
 # endif
 #endif
 
@@ -275,4 +284,16 @@ long jrand48 (unsigned short subi[3]);
 long nrand48 (unsigned short subi[3]);
 #endif
 
+#ifdef __ANDROID__
+# undef __linux__
+# ifndef __cplusplus
+#  define __cplusplus 0
+# endif
+# include <pthread.h>
+# if __cplusplus == 0
+#  undef __cplusplus
+# endif
+char *tempnam(const char *, const char *);
+#endif // ANDROID
+
 #endif /* !LIBVLC_FIXUPS_H */