tools/virtio: move module license stub to module.h
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 8 Jul 2013 02:01:10 +0000 (11:31 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 9 Jul 2013 01:17:53 +0000 (10:47 +0930)
This fixes build for the vringh test:
[linux]$ make -C tools/virtio/
make: Entering directory `/home/mst/scm/linux/tools/virtio'
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
-U_FORTIFY_SOURCE   -c -o vringh.o ../../drivers/vhost/vringh.c
../../drivers/vhost/vringh.c:1010:16: error: expected declaration
specifiers or ‘...’ before string constant

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/virtio/linux/module.h
tools/virtio/linux/virtio.h

index 3039a7e972b6cae8b90e57c17d26fff802c3096c..28ce95a059978563eb42ea4942a08e186d063ae6 100644 (file)
@@ -1 +1,6 @@
 #include <linux/export.h>
+
+#define MODULE_LICENSE(__MODULE_LICENSE_value) \
+       static __attribute__((unused)) const char *__MODULE_LICENSE_name = \
+               __MODULE_LICENSE_value
+
index cd801838156f742e07e19a918fb14de21a8f76c7..8447830407037ef065015f1ab360ad0793a642ff 100644 (file)
@@ -45,9 +45,6 @@ struct virtqueue {
        void *priv;
 };
 
-#define MODULE_LICENSE(__MODULE_LICENSE_value) \
-       const char *__MODULE_LICENSE_name = __MODULE_LICENSE_value
-
 /* Interfaces exported by virtio_ring. */
 int virtqueue_add_sgs(struct virtqueue *vq,
                      struct scatterlist *sgs[],