This fixes build on SmartOS (Joyent). Patch cherry-picked from pkgsrc by jperkin (Joyent).
Signed-off-by: Kamil Rytarowski <n...@gmx.com> --- hw/usb/dev-mtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 94c2e94f10..6e8d7b21b5 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -26,6 +26,10 @@ #include "hw/usb.h" #include "hw/usb/desc.h" +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + /* ----------------------------------------------------------------------- */ enum mtp_container_type { -- 2.14.1