--- milter-regex-parse.y.orig	2009-05-29 17:50:08.000000000 +0300
+++ milter-regex-parse.y	2009-05-29 18:02:44.000000000 +0300
@@ -73,26 +73,37 @@
 	struct macro	*next;
 } *macros = NULL;
 
-typedef struct {
-	union {
-		char			*string;
-		struct expr		*expr;
-		struct expr_list	*expr_list;
-		struct action		*action;
-	} v;
-	int lineno;
-} YYSTYPE;
-
 %}
 
+%union {
+	int lineno;
+	/* Note: each union member must begin with `int lineno' */
+	struct {
+		int lineno;
+		char *string;
+	} string;
+	struct {
+		int lineno;
+		struct expr *expr;
+	} expr;
+	struct {
+		int lineno;
+		struct expr_list *expr_list;
+	} expr_list;
+	struct {
+		int lineno;
+		struct action *action;
+	} action;
+}	
+
 %token	ERROR STRING
 %token	ACCEPT REJECT TEMPFAIL DISCARD QUARANTINE REJECT_QUICK
 %token	CONNECT HELO ENVFROM ENVRCPT HEADER BODY
 %token	AND OR NOT
-%type	<v.string>	STRING
-%type	<v.expr>	expr term
-%type	<v.expr_list>	expr_l
-%type	<v.action>	action
+%type	<string.string>	STRING
+%type	<expr.expr>	expr term
+%type	<expr_list.expr_list>	expr_l
+%type	<action.action>	action
 %%
 
 file	: /* empty */
@@ -377,8 +388,8 @@
 			}
 		}
 		*p = 0;
-		yylval.v.string = strdup(buf);
-		if (yylval.v.string == NULL) {
+		yylval.string.string = strdup(buf);
+		if (yylval.string.string == NULL) {
 			yyerror("yylex: strdup: %s", strerror(errno));
 			return (ERROR);
 		}
@@ -401,8 +412,8 @@
 		*p = 0;
 		token = lookup(buf);
 		if (token == STRING) {
-			yylval.v.string = strdup(buf);
-			if (yylval.v.string == NULL) {
+			yylval.string.string = strdup(buf);
+			if (yylval.string.string == NULL) {
 				yyerror("yylex: strdup: %s", strerror(errno));
 				return (ERROR);
 			}
@@ -436,8 +447,8 @@
 		if (c != EOF)
 			lungetc(c, fin);
 		*p = 0;
-		yylval.v.string = strdup(buf);
-		if (yylval.v.string == NULL) {
+		yylval.string.string = strdup(buf);
+		if (yylval.string.string == NULL) {
 			yyerror("yylex: strdup: %s", strerror(errno));
 			return (ERROR);
 		}
@@ -493,9 +504,6 @@
 		*r = rs;
 		return (0);
 	}
-#ifdef __linux__
-	(void)&yyrcsid; /* warning about yyrcsid declared but unused */
-#endif
 }
 
 static int
