Skip to content

Commit

Permalink
tools/virtio: move module license stub to module.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
mstsirkin authored and rustyrussell committed Jul 9, 2013
1 parent c5610a5 commit 80390df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tools/virtio/linux/module.h
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
#include <linux/export.h>

#define MODULE_LICENSE(__MODULE_LICENSE_value) \
static __attribute__((unused)) const char *__MODULE_LICENSE_name = \
__MODULE_LICENSE_value

3 changes: 0 additions & 3 deletions tools/virtio/linux/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[],
Expand Down

0 comments on commit 80390df

Please sign in to comment.