Merge pull request #2962 from octo/utils_mount
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 21 Oct 2018 16:24:36 +0000 (18:24 +0200)
committerGitHub <noreply@github.com>
Sun, 21 Oct 2018 16:24:36 +0000 (18:24 +0200)
src/utils_mount.c: Add code path for HAVE_GETMNTENT_R.

src/utils_mount.c

index 87f26df..00527ad 100644 (file)
@@ -526,8 +526,8 @@ static cu_mount_t *cu_mount_gen_getmntent(void) {
   fclose(fp);
 
   return (first);
-} /* static cu_mount_t *cu_mount_gen_getmntent (void) */
-/* #endif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT */
+}
+/* #endif HAVE_{TWO,GEN,SUN}_GETMNTENT */
 
 #elif HAVE_SEQ_GETMNTENT
 #warn "This version of `getmntent' hat not yet been implemented!"
@@ -664,6 +664,8 @@ cu_mount_t *cu_mount_getlist(cu_mount_t **list) {
   new = cu_mount_gen_getmntent();
 #elif HAVE_SEQ_GETMNTENT
 #error "This version of `getmntent' hat not yet been implemented!"
+#elif HAVE_GETMNTENT_R
+  new = cu_mount_getmntent();
 #elif HAVE_ONE_GETMNTENT
   new = cu_mount_getmntent();
 #else