Browse Source

AP_Filesystem: build fixes for SITL on macOS

master
Andy Piper 5 years ago committed by Andrew Tridgell
parent
commit
6f3334b460
  1. 4
      libraries/AP_Filesystem/AP_Filesystem_posix.cpp
  2. 2
      libraries/AP_Filesystem/posix_compat.h

4
libraries/AP_Filesystem/AP_Filesystem_posix.cpp

@ -20,7 +20,11 @@ @@ -20,7 +20,11 @@
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if defined(__APPLE__)
#include <sys/mount.h>
#else
#include <sys/vfs.h>
#endif
#include <utime.h>
extern const AP_HAL::HAL& hal;

2
libraries/AP_Filesystem/posix_compat.h

@ -87,7 +87,9 @@ int apfs_remove(const char *pathname); @@ -87,7 +87,9 @@ int apfs_remove(const char *pathname);
#define ftell(stream) apfs_ftell(stream)
#define freopen(pathname, mode, stream) apfs_freopen(pathname, mode, stream)
#define remove(pathname) apfs_remove(pathname)
#if !defined(__APPLE__)
int sprintf(char *str, const char *format, ...);
#endif
#ifdef __cplusplus
}

Loading…
Cancel
Save