[Pkg-owncloud-commits] [owncloud-client] 445/498: check_vio_ext: Fix on OS X

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit a7b0f7b42e9a3bad89ceef86e84f00ed1803ff6e
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Aug 4 17:25:48 2015 +0200

    check_vio_ext: Fix on OS X
---
 csync/src/vio/csync_vio_local_unix.c  | 2 +-
 csync/tests/vio_tests/check_vio_ext.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/csync/src/vio/csync_vio_local_unix.c b/csync/src/vio/csync_vio_local_unix.c
index a6e37b2..4e31e77 100644
--- a/csync/src/vio/csync_vio_local_unix.c
+++ b/csync/src/vio/csync_vio_local_unix.c
@@ -106,7 +106,7 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
   file_stat->name = c_utf8_from_locale(dirent->d_name);
 
   /* Check for availability of d_type, see manpage. */
-#ifdef _DIRENT_HAVE_D_TYPE
+#if defined(_DIRENT_HAVE_D_TYPE) || defined(__APPLE__)
   switch (dirent->d_type) {
     case DT_FIFO:
     case DT_SOCK:
diff --git a/csync/tests/vio_tests/check_vio_ext.c b/csync/tests/vio_tests/check_vio_ext.c
index d2c4449..7ebac93 100644
--- a/csync/tests/vio_tests/check_vio_ext.c
+++ b/csync/tests/vio_tests/check_vio_ext.c
@@ -203,6 +203,7 @@ static void traverse_dir(void **state, const char *dir, int *cnt)
     assert_non_null(dh);
 
     while( (dirent = csync_vio_readdir(csync, dh)) ) {
+        assert_non_null(dirent);
         assert_non_null(dirent->name);
 
         assert_int_equal( dirent->fields & CSYNC_VIO_FILE_STAT_FIELDS_TYPE, CSYNC_VIO_FILE_STAT_FIELDS_TYPE );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list