summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9cb5462)
When trying to access a cable with this combination, ISE displays the
following error: "Cable operation is not supported when running the
32-bit version of the application on a 64-bit platform."
This is fixed by additionally overloading the uname function and replacing
x86_64 by i686 in the returned struct in the 32-bit version of this library.
The 64-bit version will still correctly return x86_64.
#include <errno.h>
#include <inttypes.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <inttypes.h>
#include <sys/ioctl.h>
+#include <sys/utsname.h>
+#include <bits/wordsize.h>
#include "usb-driver.h"
#include "config.h"
#include "usb-driver.h"
#include "config.h"
return (*func)(pathname, mode);
}
}
return (*func)(pathname, mode);
}
}
+
+#if __WORDSIZE == 32
+int uname (struct utsname *__name) {
+ static int (*func) (struct utsname*);
+ int ret;
+
+ if (!func)
+ func = (int (*) (struct utsname*)) dlsym(RTLD_NEXT, "uname");
+
+ ret = (*func)(__name);
+
+ if (ret == 0 && (!strcmp(__name->machine, "x86_64"))) {
+ strcpy(__name->machine, "i686");
+ }
+
+ return ret;
+}
+#endif