]> git.sesse.net Git - vlc/blobdiff - compat/dirfd.c
avcodec: split encoding chunks to frame_size portions
[vlc] / compat / dirfd.c
index 99d79f9e50b870f4e024f1cf817247043b09fd65..d700b55d20be1a770305983170c95067d64e3a22 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
 #include <dirent.h>
 #include <errno.h>
 
-int dirfd (DIR *dir)
+int (dirfd) (DIR *dir)
 {
-#if defined (__sun__)
-    return dir->dd_fd;
-#elif defined (__APPLE__)
-    return dir->__dd_fd;
+#ifdef dirfd
+    return dirfd (dir);
 #else
     (void) dir;
 # ifdef ENOTSUP