[Bug 675171] New: Fix stat-related issues with MinGW

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Apr 30 09:25:56 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=675171
  GStreamer | gstreamer (core) | git

           Summary: Fix stat-related issues with MinGW
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Windows
            Status: UNCONFIRMED
          Severity: blocker
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: lrn1986 at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


This code (example from gstfilesrc.c):

#ifdef G_OS_WIN32
#include <io.h>                 /* lseek, open, close, read */
/* On win32, stat* default to 32 bit; we need the 64-bit
 * variants, so explicitly define it that way. */
#define stat __stat64
#define fstat _fstat64
#undef lseek
#define lseek _lseeki64
#undef off_t
#define off_t guint64
/* Prevent stat.h from defining the stat* functions as
 * _stat*, since we're explicitly overriding that */
#undef _INC_STAT_INL
#endif
#include <sys/stat.h>

Means that <sys/stat.h>, when included, gets mangled (all occurrences of "stat"
are replaced by "__stat64"), which results in redefinition of the "__stat64"
structure.

Until
http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=19d4c0ba73a84bfb179dcf2c09be1e4cb763c158
this was averted by gstplugin.h including <sys/stat.h> early on.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list