diff --git a/default.exports b/default.exports
index 5e767549c47d22e877c78bf7d7feac6d0744bddf..6d9344d3b5339c46fb5d12e0dc64038fb3daa708 100644
--- a/default.exports
+++ b/default.exports
@@ -1,4 +1,8 @@
 {
+	global:
+		/* See main/asterisk.exports.in for an explanation why this is
+		 * needed. */
+		_IO_stdin_used;
 	local:
 		*;
 };
diff --git a/main/asterisk.exports.in b/main/asterisk.exports.in
index 3f32be1d51237edccf8c191a1e4b5ad790317f19..364b3b05e98a728dfbabbf8ac551826399db6969 100644
--- a/main/asterisk.exports.in
+++ b/main/asterisk.exports.in
@@ -49,6 +49,25 @@
 		LINKER_SYMBOL_PREFIXres_srtp;
 		LINKER_SYMBOL_PREFIXres_srtp_policy;
 		LINKER_SYMBOL_PREFIXsecure_call_info;
+		/*
+
+		If _IO_stdin_used is not exported, stdout/stderr may not get
+		properly aligned. That causes breakage on some architectures.
+
+		http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#51
+		http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#94
+		http://lists.gnu.org/archive/html/bug-glibc/2001-12/msg00203.html
+
+		We export the symbol to get proper behaviour. Now printf
+		doesn't SIGBUS anymore on the SPARC.
+
+		Michael Karcher wrote on Jan 13, 2013:
+		> A build process that mangles the export of _IO_stdin_used is
+		> (as defined by the libc ABI, even if not explicitly written
+		> down) broken. [...]
+
+		*/
+		LINKER_SYMBOL_PREFIX_IO_stdin_used;
 	local:
 		*;
 };