File libcdaudio-getmntinfo.patch of Package libcdaudio

Author: Petr Salinger <Petr.Salinger@seznam.cz>
Description: Fixes FTBFS on kFreeBSD (Closes: #497013).

---
 src/cdaudio.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: src/cdaudio.c
===================================================================
--- src/cdaudio.c.orig
+++ src/cdaudio.c
@@ -118,8 +118,7 @@ cd_init_device(char *device_name)
 #elif defined(HAVE_GETMNTENT)
   FILE *mounts;
   struct mntent *mnt;
-#endif
-#ifdef HAVE_GETMNTINFO
+#elif defined(HAVE_GETMNTINFO)
   int mounts;
   struct statfs *mnt;
 #endif
@@ -163,8 +162,7 @@ cd_init_device(char *device_name)
     }
   }
   endmntent(mounts);
-#endif
-#ifdef HAVE_GETMNTINFO
+#elif defined(HAVE_GETMNTINFO)
   for ( (mounts = getmntinfo(&mnt, 0)); mounts > 0;)
     {
       mounts--;
openSUSE Build Service is sponsored by