5.0.0_beta1: glibc 2.4.0 quirk
PATCH 1/1 5.0.0_beta1: glibc 2.4.0 quirk
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
daemon/direct.c +8 -2
@@ -967,7 +967,10 @@ int handle_packet_expire_direct(struct apthread_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(structpthread_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
Ian Kent
maintainerQuoted 10 lines · Denys Vlasenko
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.
Cool, I'll test this out and commit it.
Thanks