hi Ian,

I have glibc 2.4.0 installed, and it expands pthread_cleanup_pop(1) into:

        } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) 
__cancel_routine (__cancel_arg); } while (0);

This doesn't compile if you have a label before it.
gcc 4.2.1 says "error: label at end of compound statement".

This patch works around it by adding extra semicolon.
--
vda
diff -d -urpN autofs-5.0.0_beta1-PATH/daemon/direct.c autofs-5.0.0_beta1-quirk/daemon/direct.c
--- autofs-5.0.0_beta1-PATH/daemon/direct.c	2007-09-26 10:29:28.000000000 +0100
+++ autofs-5.0.0_beta1-quirk/daemon/direct.c	2007-09-26 10:38:01.000000000 +0100
@@ -967,7 +967,10 @@ int handle_packet_expire_direct(struct a
 
 	pthread_cleanup_pop(1);
 done:
-	pthread_cleanup_pop(1);
+	/* glibc 2.4.0 expands it into: */
+	/* } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0); */
+	/* ...and gcc 4.2.1 says "error: label at end of compound statement" */
+	; pthread_cleanup_pop(1);
 	return status;
 }
 
@@ -1258,7 +1261,10 @@ int handle_packet_missing_direct(struct 
 
 	pthread_cleanup_pop(1);
 done:
-	pthread_cleanup_pop(1);
+	/* glibc 2.4.0 expands it into: */
+	/* } while (0); __pthread_unregister_cancel (&__cancel_buf); if (1) __cancel_routine (__cancel_arg); } while (0); */
+	/* ...and gcc 4.2.1 says "error: label at end of compound statement" */
+	; pthread_cleanup_pop(1);
 	return status;
 }
 
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to