Kaydet (Commit) 0e5a7338 authored tarafından Jack Jansen's avatar Jack Jansen

Solve sync() signature conflict differently: manually return 0 if

we have GUSI's void sync().
üst 99286f96
...@@ -58,11 +58,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -58,11 +58,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif /* USE_GUSI */ #endif /* USE_GUSI */
#ifdef USE_GUSI2 #ifdef USE_GUSI2
#define sync bad_sync
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#undef sync
int sync(void);
#else #else
#define mode_t int #define mode_t int
#include <fcntl.h> #include <fcntl.h>
...@@ -643,7 +640,12 @@ mac_sync(self, args) ...@@ -643,7 +640,12 @@ mac_sync(self, args)
if (!PyArg_ParseTuple(args, "")) if (!PyArg_ParseTuple(args, ""))
return NULL; return NULL;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
#ifdef USE_GUSI2
sync();
res = 0;
#else
res = sync(); res = sync();
#endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
if (res != 0) if (res != 0)
return mac_error(); return mac_error();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment