]> git.sesse.net Git - vlc/blobdiff - compat/dirfd.c
LGPL
[vlc] / compat / dirfd.c
index e8784f933cc4aa31a28d6695e2e57b62ba51a50a..263911f61549cb87c6891b1213ade17cb3fcf477 100644 (file)
@@ -3,19 +3,19 @@
  *****************************************************************************
  * Copyright © 2009-2011 Rémi Denis-Courmont
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
  * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * 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
- * GNU General Public License for more details.
+ * 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
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -29,6 +29,8 @@ int dirfd (DIR *dir)
 {
 #if defined (__sun__)
     return dir->dd_fd;
+#elif defined (__APPLE__)
+    return dir->__dd_fd;
 #else
     (void) dir;
 # ifdef ENOTSUP