Subject: [PATCH] drbd: fix build when CONFIG_MODULES=n

From: Randy Dunlap <[email-masked]>
Date: Mon, 27 Jul 2009 07:55:36 -0700

On Mon, 27 Jul 2009 18:05:52 +1000 Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20090724:
> 
> New trees:
> 	drbd
> 
> The drbd tree gained two build failures for which I reverted a commit from
> the rr tree and applied a patch.
> ----------------------------------------------------------------------------

(already fixed?)

---
From: Randy Dunlap <[email-masked]>

Fix drbd build when CONFIG_MODULES=n:
drivers/block/drbd/drbd_main.c:3738: error: dereferencing pointer to incomplete type

Signed-off-by: Randy Dunlap <[email-masked]>
Cc: [email-masked]
---
 drivers/block/drbd/drbd_main.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20090727.orig/drivers/block/drbd/drbd_main.c
+++ linux-next-20090727/drivers/block/drbd/drbd_main.c
@@ -3733,12 +3733,16 @@ const char *drbd_buildtag(void)
 
 	static char buildtag[38] = "\0uilt-in";
 
+#ifdef CONFIG_MODULES
 	if (buildtag[0] == 0) {
 		if (THIS_MODULE != NULL)
 			sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
 		else
 			buildtag[0] = 'b';
 	}
+#else
+	buildtag[0] = 'b';
+#endif
 
 	return buildtag;
 }