diff --git a/NetSNMP.cabal b/NetSNMP.cabal
--- a/NetSNMP.cabal
+++ b/NetSNMP.cabal
@@ -1,6 +1,6 @@
 
 Name:               NetSNMP
-Version:            0.3.0.5
+Version:            0.3.0.6
 Synopsis:           Bindings for net-snmp's C API for clients
 Description:        Network.Protocol.NetSNMP is a partial binding to the
                     library portion of the net-snmp package.  It uses the
@@ -10,7 +10,7 @@
                     expanded functionality, and especially if you would
                     like to contribute.
 Category:           Network
-Cabal-Version:      >= 1.2
+Cabal-Version:      >= 1.8
 License:            BSD3
 License-file:       LICENSE
 Author:             Pavlo Kerestey and Humane Software for Global Access Internet Services GmbH
@@ -29,3 +29,13 @@
   extensions:       ForeignFunctionInterface, CPP, EmptyDataDecls
   extra-libraries:  netsnmp
   ghc-options:      -static -optc-static -optl-static -optl-pthread
+
+test-suite tests
+  hs-source-dirs:   tests
+  extensions:       OverloadedStrings
+  type:		    exitcode-stdio-1.0
+  main-is:          RunTests.hs
+  build-depends:    base >= 4.5 && <5
+                   ,HUnit
+                   ,NetSNMP
+                   ,process > 1.1 && < 1.2
diff --git a/src/Network/Protocol/NetSNMP.hsc b/src/Network/Protocol/NetSNMP.hsc
--- a/src/Network/Protocol/NetSNMP.hsc
+++ b/src/Network/Protocol/NetSNMP.hsc
@@ -67,7 +67,15 @@
   sizeOf    _ = #size struct snmp_pdu
   alignment _ = 16
 
+-- |The net-snmp C library on 64-bit OS X systems still uses 32-bit oid parts in
+--    the responses. Please make sure that the library produces sane
+--    results on your system by cloning the source code and running `make test`.
+#if defined(darwin)
+type OIDpart = CUInt
+#else
 type OIDpart = #{type oid}
+#endif /* GHC */
+
 type RawOID = [OIDpart]
 
 showOid :: RawOID -> String
diff --git a/tests/RunTests.hs b/tests/RunTests.hs
new file mode 100644
--- /dev/null
+++ b/tests/RunTests.hs
@@ -0,0 +1,26 @@
+module Main where
+
+import Network.Protocol.NetSNMP
+import System.Exit
+import SystemTest.Platform (tests)
+import Test.HUnit
+
+main :: IO ()
+main = runTestTT testSuites >>= testResultToExitCode
+
+testSuites = test [
+  "platform compliance" ~: SystemTest.Platform.tests
+  ]
+
+
+testResultToExitCode :: Counts -> IO ()
+testResultToExitCode (Counts _ _ e f) =  if ((e+f) == 0) then exitSuccess else grandFailure
+
+grandFailure :: IO ()
+grandFailure = putStrLn xz >> exitFailure
+
+xz = " ___\n" ++
+     "{O,o}\n" ++
+     "|)__)\n" ++
+     "-\"-\"-\n" ++
+     "O RLY?\n"
