Skip to content

Commit 19b9111

Browse files
committed
PlugIn: allow for a fallback for other platforms
The Windows path was left as the other case initially during the last update. This explicitly captures the Windows path and should allow addition of new targets. This addresses some review comments from @stevapple.
1 parent 675ce56 commit 19b9111

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)