diff --git a/extensions/CIE.c b/extensions/CIE.c
index 75c1213..36f2b40 100644
--- a/extensions/CIE.c
+++ b/extensions/CIE.c
@@ -49,11 +49,11 @@ init (void)
 static void
 components (void)
 {
-  babl_component_new ("CIE L", NULL);
-  babl_component_new ("CIE a", "chroma", NULL);
-  babl_component_new ("CIE b", "chroma", NULL);
-  babl_component_new ("CIE C(ab)", "chroma", NULL);
-  babl_component_new ("CIE H(ab)", "chroma", NULL);
+  babl_component_new ("CIE L", (char *)NULL);
+  babl_component_new ("CIE a", "chroma", (char *)NULL);
+  babl_component_new ("CIE b", "chroma", (char *)NULL);
+  babl_component_new ("CIE C(ab)", "chroma", (char *)NULL);
+  babl_component_new ("CIE H(ab)", "chroma", (char *)NULL);
 }
 
 static void
@@ -64,7 +64,7 @@ models (void)
     babl_component ("CIE L"),
     babl_component ("CIE a"),
     babl_component ("CIE b"),
-    NULL);
+    (char *)NULL);
 
   babl_model_new (
     "name", "CIE Lab alpha",
@@ -72,14 +72,14 @@ models (void)
     babl_component ("CIE a"),
     babl_component ("CIE b"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 
   babl_model_new (
     "name", "CIE LCH(ab)",
     babl_component ("CIE L"),
     babl_component ("CIE C(ab)"),
     babl_component ("CIE H(ab)"),
-    NULL);
+    (char *)NULL);
 
   babl_model_new (
     "name", "CIE LCH(ab) alpha",
@@ -87,7 +87,7 @@ models (void)
     babl_component ("CIE C(ab)"),
     babl_component ("CIE H(ab)"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 }
 
 /***********    cpercep.h *********   */
@@ -374,50 +374,50 @@ conversions (void)
     babl_model ("RGBA"),
     babl_model ("CIE Lab"),
     "linear", rgba_to_lab,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("CIE Lab"),
     babl_model ("RGBA"),
     "linear", lab_to_rgba,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("RGBA"),
     babl_model ("CIE Lab alpha"),
     "linear", rgba_to_laba,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("CIE Lab alpha"),
     babl_model ("RGBA"),
     "linear", laba_to_rgba,
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_model ("RGBA"),
     babl_model ("CIE LCH(ab)"),
     "linear", rgba_to_lchab,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("CIE LCH(ab)"),
     babl_model ("RGBA"),
     "linear", lchab_to_rgba,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("RGBA"),
     babl_model ("CIE LCH(ab) alpha"),
     "linear", rgba_to_lchaba,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_model ("CIE LCH(ab) alpha"),
     babl_model ("RGBA"),
     "linear", lchaba_to_rgba,
-    NULL
+    (char *)NULL
   );
 
   cpercep_init ();
@@ -434,7 +434,7 @@ formats (void)
     babl_component ("CIE L"),
     babl_component ("CIE a"),
     babl_component ("CIE b"),
-    NULL);
+    (char *)NULL);
 
   babl_format_new (
     "name", "CIE Lab alpha float",
@@ -445,7 +445,7 @@ formats (void)
     babl_component ("CIE a"),
     babl_component ("CIE b"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 
   babl_format_new (
     "name", "CIE Lab u8",
@@ -457,7 +457,7 @@ formats (void)
     babl_component ("CIE a"),
     babl_type ("CIE u8 ab"),
     babl_component ("CIE b"),
-    NULL);
+    (char *)NULL);
 
   babl_format_new (
     "name", "CIE Lab u16",
@@ -469,7 +469,7 @@ formats (void)
     babl_component ("CIE a"),
     babl_type ("CIE u16 ab"),
     babl_component ("CIE b"),
-    NULL);
+    (char *)NULL);
 
 
   babl_format_new (
@@ -480,7 +480,7 @@ formats (void)
     babl_component ("CIE L"),
     babl_component ("CIE C(ab)"),
     babl_component ("CIE H(ab)"),
-    NULL);
+    (char *)NULL);
 
   babl_format_new (
     "name", "CIE LCH(ab) alpha float",
@@ -491,7 +491,7 @@ formats (void)
     babl_component ("CIE C(ab)"),
     babl_component ("CIE H(ab)"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 }
 
 
@@ -595,7 +595,7 @@ types_u8 (void)
     "bits", 8,
     "min_val", 0.0,
     "max_val", 100.0,
-    NULL
+    (char *)NULL
   );
 
   babl_type_new (
@@ -605,33 +605,33 @@ types_u8 (void)
     "bits", 8,
     "min_val", -50.0,
     "max_val", 50.0,
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_type ("CIE u8 L"),
     babl_type ("double"),
     "plane", convert_u8_l_double,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_type ("double"),
     babl_type ("CIE u8 L"),
     "plane", convert_double_u8_l,
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_type ("CIE u8 ab"),
     babl_type ("double"),
     "plane", convert_u8_ab_double,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_type ("double"),
     babl_type ("CIE u8 ab"),
     "plane", convert_double_u8_ab,
-    NULL
+    (char *)NULL
   );
 }
 
@@ -732,7 +732,7 @@ types_u16 (void)
     "bits", 16,
     "min_val", 0.0,
     "max_val", 100.0,
-    NULL
+    (char *)NULL
   );
 
   babl_type_new (
@@ -743,7 +743,7 @@ types_u16 (void)
     "bits", 16,
     "min_val", -50.0,
     "max_val", 50.0,
-    NULL
+    (char *)NULL
   );
 
 
@@ -751,26 +751,26 @@ types_u16 (void)
     babl_type ("CIE u16 L"),
     babl_type ("double"),
     "plane", convert_u16_l_double,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_type ("double"),
     babl_type ("CIE u16 L"),
     "plane", convert_double_u16_l,
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_type ("CIE u16 ab"),
     babl_type ("double"),
     "plane", convert_u16_ab_double,
-    NULL
+    (char *)NULL
   );
   babl_conversion_new (
     babl_type ("double"),
     babl_type ("CIE u16 ab"),
     "plane", convert_double_u16_ab,
-    NULL
+    (char *)NULL
   );
 }
 
diff --git a/extensions/cairo.c b/extensions/cairo.c
index abc87fd..dec7088 100644
--- a/extensions/cairo.c
+++ b/extensions/cairo.c
@@ -86,7 +86,7 @@ init (void)
         babl_component ("G'a"),
         babl_component ("R'a"),
         babl_component ("A"),
-        NULL
+        (char *)NULL
       );
 
       const Babl *f24 = babl_format_new (
@@ -97,15 +97,15 @@ init (void)
         babl_component ("G'"),
         babl_component ("R'"),
         babl_component ("PAD"),
-        NULL
+        (char *)NULL
       );
 
       babl_conversion_new (babl_format ("R'aG'aB'aA u8"), f32, "linear", 
-                           conv_rgbA8_cairo32_le, NULL);
+                           conv_rgbA8_cairo32_le, (char *)NULL);
       babl_conversion_new (babl_format ("R'G'B'A u8"), f24, "linear", 
-                           conv_rgba8_cairo24_le, NULL);
+                           conv_rgba8_cairo24_le, (char *)NULL);
       babl_conversion_new (babl_format ("R'G'B' u8"), f24, "linear", 
-                           conv_rgb8_cairo24_le, NULL);
+                           conv_rgb8_cairo24_le, (char *)NULL);
     }
   else
     {
@@ -117,7 +117,7 @@ init (void)
         babl_component ("R'a"),
         babl_component ("G'a"),
         babl_component ("B'a"),
-        NULL
+        (char *)NULL
       );
       babl_format_new (
         "name", "cairo-RGB24",
@@ -127,7 +127,7 @@ init (void)
         babl_component ("R'"),
         babl_component ("G'"),
         babl_component ("B'"),
-        NULL
+        (char *)NULL
       );
     }
   babl_format_new (
@@ -135,7 +135,7 @@ init (void)
     babl_model ("YA"),
     babl_type ("u8"),
     babl_component ("A"),
-    NULL
+    (char *)NULL
   );
   return 0;
 }
diff --git a/extensions/fast-float.c b/extensions/fast-float.c
index fd7fb9f..ea0e51e 100644
--- a/extensions/fast-float.c
+++ b/extensions/fast-float.c
@@ -388,7 +388,7 @@ conv_rgbF_gamma_rgbF_linear (unsigned char *src,
 }
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
 int init (void);
 
@@ -402,7 +402,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF_linear = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
@@ -410,7 +410,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbaF_gamma = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("float"),
@@ -418,7 +418,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF_gamma = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("float"),
@@ -426,21 +426,21 @@ init (void)
     babl_component ("G'a"),
     babl_component ("B'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF_gamma = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("float"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
 
   {
     float f;
diff --git a/extensions/float.c b/extensions/float.c
index 067d4e9..f08556b 100644
--- a/extensions/float.c
+++ b/extensions/float.c
@@ -164,7 +164,7 @@ conv_rgbF_gamma_rgbF_linear (unsigned char *src,
 }
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
 int init (void);
 
@@ -178,7 +178,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF_linear = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
@@ -186,7 +186,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbaF_gamma = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("float"),
@@ -194,7 +194,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF_gamma = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("float"),
@@ -202,21 +202,21 @@ init (void)
     babl_component ("G'a"),
     babl_component ("B'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF_gamma = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("float"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
 
   o (rgbAF_linear, rgbAF_gamma);
   o (rgbaF_linear, rgbAF_gamma);
diff --git a/extensions/gegl-fixups.c b/extensions/gegl-fixups.c
index 5a1b972..3c921f5 100644
--- a/extensions/gegl-fixups.c
+++ b/extensions/gegl-fixups.c
@@ -478,7 +478,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
@@ -486,7 +486,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 
   const Babl *lrgba8 = babl_format_new (
     babl_model ("RGBA"),
@@ -495,7 +495,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 
   const Babl *rgba8 = babl_format_new (
     babl_model ("R'G'B'A"),
@@ -504,7 +504,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *bgrA8 = babl_format_new (
     "name", "B'aG'aR'aA u8",
     babl_model ("R'aG'aB'aA"),
@@ -513,19 +513,19 @@ init (void)
     babl_component ("G'a"),
     babl_component ("R'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
 
   table_init ();
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
   o (rgbaF, rgbAF);
   o (rgbAF, rgbaF);
diff --git a/extensions/gggl-lies.c b/extensions/gggl-lies.c
index e3c0029..2a25d86 100644
--- a/extensions/gggl-lies.c
+++ b/extensions/gggl-lies.c
@@ -1567,7 +1567,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba16 = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u16"),
@@ -1575,7 +1575,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbaD = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("double"),
@@ -1583,7 +1583,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8 = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
@@ -1591,7 +1591,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
@@ -1599,7 +1599,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbA16 = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("u16"),
@@ -1607,7 +1607,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbA8 = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("u8"),
@@ -1615,82 +1615,82 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb16 = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u16"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8 = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *gaF = babl_format_new (
     babl_model ("YA"),
     babl_type ("float"),
     babl_component ("Y"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gAF = babl_format_new (
     babl_model ("YaA"),
     babl_type ("float"),
     babl_component ("Ya"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gF = babl_format_new (
     babl_model ("Y"),
     babl_type ("float"),
     babl_component ("Y"),
-    NULL);
+    (char *)NULL);
   const Babl *ga16 = babl_format_new (
     babl_model ("YA"),
     babl_type ("u16"),
     babl_component ("Y"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gA16 = babl_format_new (
     babl_model ("YaA"),
     babl_type ("u16"),
     babl_component ("Ya"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *g16 = babl_format_new (
     babl_model ("Y"),
     babl_type ("u16"),
     babl_component ("Y"),
-    NULL);
+    (char *)NULL);
   const Babl *ga8 = babl_format_new (
     babl_model ("YA"),
     babl_type ("u8"),
     babl_component ("Y"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gA8 = babl_format_new (
     babl_model ("YaA"),
     babl_type ("u8"),
     babl_component ("Ya"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *g8 = babl_format_new (
     babl_model ("Y"),
     babl_type ("u8"),
     babl_component ("Y"),
-    NULL);
+    (char *)NULL);
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
   o (rgbaF, rgbaD);
   o (rgbaD, rgbaF);
diff --git a/extensions/gggl.c b/extensions/gggl.c
index 6a007c6..6c64b3a 100644
--- a/extensions/gggl.c
+++ b/extensions/gggl.c
@@ -1638,7 +1638,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbaF = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("float"),
@@ -1646,7 +1646,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba16 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u16"),
@@ -1654,7 +1654,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
@@ -1662,7 +1662,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbAF = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("float"),
@@ -1670,7 +1670,7 @@ init (void)
     babl_component ("G'a"),
     babl_component ("B'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbA16 = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("u16"),
@@ -1678,7 +1678,7 @@ init (void)
     babl_component ("G'a"),
     babl_component ("B'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbA8 = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("u8"),
@@ -1686,79 +1686,79 @@ init (void)
     babl_component ("G'a"),
     babl_component ("B'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("float"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb16 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u16"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
   const Babl *gaF = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("float"),
     babl_component ("Y'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gAF = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("float"),
     babl_component ("Y'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gF = babl_format_new (
     babl_model ("Y'"),
     babl_type ("float"),
     babl_component ("Y'"),
-    NULL);
+    (char *)NULL);
   const Babl *ga16 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u16"),
     babl_component ("Y'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gA16 = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("u16"),
     babl_component ("Y'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *g16 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u16"),
     babl_component ("Y'"),
-    NULL);
+    (char *)NULL);
   const Babl *ga8 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u8"),
     babl_component ("Y'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gA8 = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("u8"),
     babl_component ("Y'a"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *g8 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u8"),
     babl_component ("Y'"),
-    NULL);
+    (char *)NULL);
   const Babl *yuvF = babl_format_new (
     babl_model ("Y'CbCr"),
     babl_type ("float"),
@@ -1766,7 +1766,7 @@ init (void)
     babl_type ("float"),
     babl_component ("Cb"),
     babl_component ("Cr"),
-    NULL);
+    (char *)NULL);
   const Babl *yuvaF = babl_format_new (
     babl_model ("Y'CbCrA"),
     babl_type ("float"),
@@ -1775,10 +1775,10 @@ init (void)
     babl_component ("Cb"),
     babl_component ("Cr"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
   o (rgbaF, rgba8);
   o (rgba8, rgbaF);
diff --git a/extensions/gimp-8bit.c b/extensions/gimp-8bit.c
index d3e9522..315644e 100644
--- a/extensions/gimp-8bit.c
+++ b/extensions/gimp-8bit.c
@@ -396,7 +396,7 @@ init (void)
     babl_component ("Ga"),
     babl_component ("Ba"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbaF_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("float"),
@@ -404,7 +404,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
@@ -412,7 +412,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8_gamma_2_2 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
@@ -420,66 +420,66 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgbF_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8_gamma_2_2 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
   const Babl *gaF_linear = babl_format_new (
     babl_model ("YA"),
     babl_type ("float"),
     babl_component ("Y"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *ga8_linear = babl_format_new (
     babl_model ("YA"),
     babl_type ("u8"),
     babl_component ("Y"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *ga8_gamma_2_2 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u8"),
     babl_component ("Y'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *gF_linear = babl_format_new (
     babl_model ("Y"),
     babl_type ("float"),
     babl_component ("Y"),
-    NULL);
+    (char *)NULL);
   const Babl *g8_linear = babl_format_new (
     babl_model ("Y"),
     babl_type ("u8"),
     babl_component ("Y"),
-    NULL);
+    (char *)NULL);
   const Babl *g8_gamma_2_2 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u8"),
     babl_component ("Y'"),
-    NULL);
+    (char *)NULL);
 
   tables_init ();
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
   o (rgba8_linear, ragabaaF_linear);
   o (rgba8_linear, rgbaF_linear);
diff --git a/extensions/naive-CMYK.c b/extensions/naive-CMYK.c
index 75723da..d4eabee 100644
--- a/extensions/naive-CMYK.c
+++ b/extensions/naive-CMYK.c
@@ -36,10 +36,10 @@ int init (void);
 int
 init (void)
 {
-  babl_component_new ("cyan", NULL);
-  babl_component_new ("yellow", NULL);
-  babl_component_new ("magenta", NULL);
-  babl_component_new ("key", NULL);
+  babl_component_new ("cyan", (char *)NULL);
+  babl_component_new ("yellow", (char *)NULL);
+  babl_component_new ("magenta", (char *)NULL);
+  babl_component_new ("key", (char *)NULL);
 
   babl_model_new (
     "name", "CMYK",
@@ -47,21 +47,21 @@ init (void)
     babl_component ("magenta"),
     babl_component ("yellow"),
     babl_component ("key"),
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_model ("RGBA"),
     babl_model ("CMYK"),
     "linear", rgba_to_cmyk,
-    NULL
+    (char *)NULL
   );
 
   babl_conversion_new (
     babl_model ("CMYK"),
     babl_model ("RGBA"),
     "linear", cmyk_to_rgba,
-    NULL
+    (char *)NULL
   );
   babl_format_new (
     "name", "CMYK float",
@@ -71,7 +71,7 @@ init (void)
     babl_component ("yellow"),
     babl_component ("magenta"),
     babl_component ("key"),
-    NULL
+    (char *)NULL
   );
 
   return 0;
diff --git a/extensions/sse-fixups.c b/extensions/sse-fixups.c
index 95f1cc8..f35a95e 100644
--- a/extensions/sse-fixups.c
+++ b/extensions/sse-fixups.c
@@ -172,7 +172,7 @@ conv_rgbaF_linear_rgba8_linear (unsigned char *src,
 #endif
 
 #define o(src, dst) \
-  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL)
+  babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, (char *)NULL)
 
 int init (void);
 
@@ -188,7 +188,7 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
@@ -196,14 +196,14 @@ init (void)
     babl_component ("G"),
     babl_component ("B"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
-    NULL);
+    (char *)NULL);
 
   const Babl *rgbaF_gamma = babl_format_new (
     babl_model ("R'G'B'A"),
@@ -212,7 +212,7 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgba8_gamma = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
@@ -220,14 +220,14 @@ init (void)
     babl_component ("G'"),
     babl_component ("B'"),
     babl_component ("A"),
-    NULL);
+    (char *)NULL);
   const Babl *rgb8_gamma = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
-    NULL);
+    (char *)NULL);
 
   if ((babl_cpu_accel_get_support () & BABL_CPU_ACCEL_X86_MMX) &&
       (babl_cpu_accel_get_support () & BABL_CPU_ACCEL_X86_SSE) &&
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3d74227..26af0b3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,8 +24,10 @@ TESTS_ENVIRONMENT = BABL_PATH=$(top_builddir)/extensions/.libs
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl
 if OS_UNIX
+if !PLATFORM_WIN32
 AM_LDFLAGS  = -pthread
 endif
+endif
 
 LDADD = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
 	$(MATH_LIB)
