Work around linkage bug cross-compiling from x86_64-apple-darwin to i686-apple-darwin
The correct opendir/readdir to use appear to be the 64-bit versions called opendir$INODE64, etc. but for some reason I can't get them to link properly on i686. Putting them in librustrt and making gcc figure it out works. This mystery will have to wait for another day.
This commit is contained in:
@@ -818,6 +818,33 @@ rust_dec_kernel_live_count() {
|
||||
task->kernel->dec_live_count();
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
extern "C" DIR*
|
||||
rust_opendir(char *dirname) {
|
||||
return opendir(dirname);
|
||||
}
|
||||
|
||||
extern "C" dirent*
|
||||
rust_readdir(DIR *dirp) {
|
||||
return readdir(dirp);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
extern "C" void
|
||||
rust_opendir() {
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_readdir() {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Local Variables:
|
||||
// mode: C++
|
||||
|
||||
Reference in New Issue
Block a user