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:
parent
5d5a6848b5
commit
fd836a9165
@ -67,10 +67,16 @@ acpi_device_init_driver(device_node_handle node, void *user_cookie, void **cooki
|
||||
device->path = path;
|
||||
device->type = type;
|
||||
device->node = node;
|
||||
|
||||
|
||||
#ifdef __HAIKU__
|
||||
snprintf(device->name, sizeof(device->name), "acpi_device %s",
|
||||
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;
|
||||
|
||||
return status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user