diff --git a/src/libFLAC/ia32/nasm.h b/src/libFLAC/ia32/nasm.h
index efa6808..aac9194 100644
--- a/src/libFLAC/ia32/nasm.h
+++ b/src/libFLAC/ia32/nasm.h
@@ -46,12 +46,17 @@
 	%idefine code_section section .text
 	%idefine data_section section .data
 	%idefine bss_section  section .bss
+%elifdef OBJ_FORMAT_macho
+	%define FLAC__PUBLIC_NEEDS_UNDERSCORE
+	%idefine code_section section .text
+	%idefine data_section section .data
+	%idefine bss_section  section .bss
 %elifdef OBJ_FORMAT_elf
 	%idefine code_section section .text align=16
 	%idefine data_section section .data align=32
 	%idefine bss_section  section .bss  align=32
 %else
-	%error unsupported object format!
+	%error unsupported object format! ; this directive doesn't really work here
 %endif
 
 %imacro cglobal 1
