Stringify the port
authorSam Hartman <hartmans@debian.org>
Fri, 14 Mar 2014 23:22:42 +0000 (19:22 -0400)
committerSam Hartman <hartmans@debian.org>
Fri, 14 Mar 2014 23:22:42 +0000 (19:22 -0400)
src/modules/rlm_realm/rlm_realm.c

index 7e0ce21..bef7e10 100644 (file)
@@ -42,6 +42,8 @@ typedef struct realm_config_t {
   unsigned int tr_port;
 } realm_config_t;
 
+#define stringify(s) #s
+
 static CONF_PARSER module_config[] = {
   { "format", PW_TYPE_STRING_PTR,
     offsetof(realm_config_t,formatstring), NULL, "suffix" },
@@ -58,7 +60,7 @@ static CONF_PARSER module_config[] = {
   { "trust_router", PW_TYPE_STRING_PTR,
     offsetof(realm_config_t,trust_router), NULL, "none" },
   { "tr_port", PW_TYPE_INTEGER,
-    offsetof(realm_config_t,tr_port), NULL, (TID_PORT) },
+    offsetof(realm_config_t,tr_port), NULL, (stringify(TID_PORT)) },
   { NULL, -1, 0, NULL, NULL }    /* end the list */
 };