Fix build on fro non-haiku targets, on which libroot.so lacks
snprintf()... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21593 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -67,10 +67,16 @@ acpi_device_init_driver(device_node_handle node, void *user_cookie, void **cooki
|
|||||||
device->path = path;
|
device->path = path;
|
||||||
device->type = type;
|
device->type = type;
|
||||||
device->node = node;
|
device->node = node;
|
||||||
|
|
||||||
|
#ifdef __HAIKU__
|
||||||
snprintf(device->name, sizeof(device->name), "acpi_device %s",
|
snprintf(device->name, sizeof(device->name), "acpi_device %s",
|
||||||
path);
|
path);
|
||||||
|
#else
|
||||||
|
strncpy(device->name, "acpi_device ", sizeof(device->name) - 1);
|
||||||
|
strncat(device->name, path, sizeof(device->name) - 1);
|
||||||
|
device->name[sizeof(device->name) - 1] = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
*cookie = device;
|
*cookie = device;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user