Skip to content

Commit 3d1c1ad

Browse files
authored
Merge pull request #3150 from compnerd/cases
PlugIn: allow for a fallback for other platforms
2 parents 675ce56 + 19b9111 commit 3d1c1ad

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CoreFoundation/PlugIn.subproj/CFBundle_Internal.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static bool _CFGetPathFromFileDescriptor(int fd, char *path) {
455455
return true;
456456
}
457457

458-
#else
458+
#elif TARGET_OS_WIN32
459459

460460
static bool _CFGetPathFromFileDescriptor(int fd, char *path) {
461461
HANDLE hFile = _get_osfhandle(fd);
@@ -483,6 +483,13 @@ static bool _CFGetPathFromFileDescriptor(int fd, char *path) {
483483
return true;
484484
}
485485

486+
#else
487+
488+
static bool _CFGetPathFromFileDescriptor(int fd, char *path) {
489+
#warning This platform does not have a way to go back from an open file descriptor to a path.
490+
return false;
491+
}
492+
486493
#endif
487494

488495
CF_EXTERN_C_END

0 commit comments

Comments
 (0)