>> --- a/hw/9pfs/9p-local.c
>> +++ b/hw/9pfs/9p-local.c
>> @@ -67,7 +67,10 @@ int local_open_nofollow(FsContext *fs_ctx, const char 
>> *path, int flags,
>>          assert(*path != '/');
>>
>>          head = g_strdup(path);
>> -        c = strchrnul(path, '/');
>> +        /* equivalent to strchrnul(), but that is not available on Darwin */
>
> Please make a qemu_strchrnul() helper with a separate implementation for 
> Darwin
> then. I guess you can put it in this file since there aren't any other users 
> in
> the QEMU code base.

There actually are, but they also use this pattern. Could you
suggest the best place to put this utility? I can submit a patch
to switch all instances of this pattern over.

Reply via email to