2 --- src/base/ftsystem.c
3 +++ src/base/ftsystem.c
11 #include FT_CONFIG_CONFIG_H
13 const char* filepathname )
25 - file = ft_fopen( filepathname, "rb" );
26 + if ( sscanf( filepathname, "/:FD:/%d%n", &nFD, &n ) == 1 && filepathname[n] == '\0')
28 + lseek( nFD, 0, SEEK_SET );
29 + file = fdopen( dup( nFD ), "rb" );
32 + file = ft_fopen( filepathname, "rb" );
35 FT_ERROR(( "FT_Stream_Open:"
36 --- builds/unix/ftsystem.c
37 +++ builds/unix/ftsystem.c
47 return FT_THROW( Invalid_Stream_Handle );
50 - file = open( filepathname, O_RDONLY );
51 + if ( sscanf( filepathname, "/:FD:/%d%n", &nFD, &n ) == 1 && filepathname[n] == '\0')
53 + lseek( nFD, 0, SEEK_SET );
57 + file = open( filepathname, O_RDONLY );
60 FT_ERROR(( "FT_Stream_Open:" ));