Skip to content

file/fdsrc: use struct stat64 on android to match stat64()

Matthew Waters requested to merge ystreet/gstreamer:android-werror-fix into master

Fixes android werror failures:

../plugins/elements/gstfdsrc.c:244:25: error: incompatible pointer types passing 'struct stat *' to parameter of type 'struct stat64 *' [-Werror,-Wincompatible-pointer-types]
    if (fstat (src->fd, &stat_results) < 0)
                        ^~~~~~~~~~~~~
/home/matt/Projects/cerbero/build/android-ndk-18/sysroot/usr/include/sys/stat.h:159:38: note: passing argument to parameter '__buf' here
int fstat64(int __fd, struct stat64* __buf) __RENAME_STAT64(fstat, 3, 21);
                                     ^
../plugins/elements/gstfdsrc.c:560:23: error: incompatible pointer types passing 'struct stat *' to parameter of type 'struct stat64 *' [-Werror,-Wincompatible-pointer-types]
  if (fstat (src->fd, &stat_results) < 0)
                      ^~~~~~~~~~~~~
/home/matt/Projects/cerbero/build/android-ndk-18/sysroot/usr/include/sys/stat.h:159:38: note: passing argument to parameter '__buf' here
int fstat64(int __fd, struct stat64* __buf) __RENAME_STAT64(fstat, 3, 21);
                                     ^

  if (fstat (fd, &stat_results) < 0)
                 ^~~~~~~~~~~~~
/home/matt/Projects/cerbero/build/android-ndk-18/sysroot/usr/include/sys/stat.h:159:38: note: passing argument to parameter '__buf' here
int fstat64(int __fd, struct stat64* __buf) __RENAME_STAT64(fstat, 3, 21);
                                     ^

  if (fstat (src->fd, &stat_results) < 0)
                      ^~~~~~~~~~~~~
../../../../../android-ndk-18/sysroot/usr/include/sys/stat.h:159:38: note: passing argument to parameter '__buf' here
int fstat64(int __fd, struct stat64* __buf) __RENAME_STAT64(fstat, 3, 21);
                                     ^
../plugins/elements/gstfilesrc.c:477:23: error: incompatible pointer types passing 'struct stat *' to parameter of type 'struct stat64 *' [-Werror,-Wincompatible-pointer-types]
  if (fstat (src->fd, &stat_results) < 0)
                      ^~~~~~~~~~~~~
../../../../../android-ndk-18/sysroot/usr/include/sys/stat.h:159:38: note: passing argument to parameter '__buf' here
int fstat64(int __fd, struct stat64* __buf) __RENAME_STAT64(fstat, 3, 21);
                                     ^

Merge request reports