Created
April 24, 2015 02:15
-
-
Save nonakap/cd0a13fa2451e47dd425 to your computer and use it in GitHub Desktop.
edmus を NetBSD でコンパイルするためのパッチ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: linux/Makefile | |
| =================================================================== | |
| --- linux/Makefile (revision 83) | |
| +++ linux/Makefile (working copy) | |
| @@ -11,7 +11,9 @@ | |
| RM = rm -f | |
| CFLAGS = -Wall -O3 -I. -Wno-invalid-offsetof | |
| +CFLAGS += -I/usr/pkg/include | |
| LFLAGS = | |
| +LFLAGS += -L/usr/pkg/lib -R/usr/pkg/lib | |
| LIBS = -lstdc++ -lusb -lpthread | |
| TARGET = edmus | |
| Index: linux/gimic/usbdev.cpp | |
| =================================================================== | |
| --- linux/gimic/usbdev.cpp (revision 83) | |
| +++ linux/gimic/usbdev.cpp (working copy) | |
| @@ -143,7 +143,9 @@ | |
| { | |
| if (::usb_set_configuration(dh, dev->config->bConfigurationValue) < 0) | |
| { | |
| +#ifdef LIBUSB_HAS_GET_DRIVER_NP | |
| if (::usb_detach_kernel_driver_np(dh, dev->config->interface->altsetting->bInterfaceNumber) < 0) | |
| +#endif | |
| { | |
| printf("usb_set_configuration Error.\n"); | |
| printf("usb_detach_kernel_driver_np Error.(%s)\n", ::usb_strerror()); | |
| @@ -152,7 +154,9 @@ | |
| } | |
| if (::usb_claim_interface(dh, dev->config->interface->altsetting->bInterfaceNumber) < 0) | |
| { | |
| +#ifdef LIBUSB_HAS_GET_DRIVER_NP | |
| if (::usb_detach_kernel_driver_np(dh,dev->config->interface->altsetting->bInterfaceNumber) < 0) | |
| +#endif | |
| { | |
| printf("usb_claim_interface Error.\n"); | |
| printf("usb_detach_kernel_driver_np Error.(%s)\n", ::usb_strerror()); | |
| @@ -212,7 +216,7 @@ | |
| { | |
| return -1; | |
| } | |
| - const int nResult = ::usb_bulk_write(m_dh, m_nOutEndPoint, static_cast<const char*>(lpBuffer), cbBuffer, 0); | |
| + const int nResult = ::usb_bulk_write(m_dh, m_nOutEndPoint, const_cast<char *>(static_cast<const char*>(lpBuffer)), cbBuffer, 0); | |
| if (nResult < 0) | |
| { | |
| ::printf("Unable to perform bulk write (%d)\n", nResult); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment