> +#ifdef CONFIG_LINUX
> +void virtio_gpu_init_udmabuf(struct virtio_gpu_simple_resource *res)
> +#else
> +void *virtio_gpu_init_udmabuf(struct virtio_gpu_simple_resource *res)
> +{
> + /* nothing (stub) */
> + return NULL
> +}
Fails to build for !linux ...
You can place the stubs in a file in the stubs/ directory instead.
They'll be used via weak symbol references instead of #ifdefs then.
Advantage: the stubs are compiled unconditionally so errors like this
don't go unnoticed that easily.
take care,
Gerd