diff --git a/examples/opusfile_example.c b/examples/opusfile_example.c
index 22a13d69b71579f29394eaa94bc23fa6e3d05b68..113a252a665293d5780d88c89a63e12be37e0765 100644
--- a/examples/opusfile_example.c
+++ b/examples/opusfile_example.c
@@ -155,7 +155,11 @@ int main(int _argc,const char **_argv){
   }
   else{
     /*Try to treat the argument as a URL.*/
+#if defined(OP_ENABLE_HTTP)
     of=op_open_url(_argv[1],&ret,NULL);
+#else
+    of=NULL;
+#endif
 #if 0
     if(of==NULL){
       OpusFileCallbacks  cb={NULL,NULL,NULL,NULL};
diff --git a/examples/seeking_example.c b/examples/seeking_example.c
index 4aabb5bd78e107e43f395e71033fefaff2deb9c9..9f04d0b925d380f48e70c1ad62f72775e83aeaf7 100644
--- a/examples/seeking_example.c
+++ b/examples/seeking_example.c
@@ -275,8 +275,12 @@ int main(int _argc,const char **_argv){
   if(strcmp(_argv[1],"-")==0)fp=op_fdopen(&cb,fileno(stdin),"rb");
   else{
     /*Try to treat the argument as a URL.*/
+#if defined(OP_ENABLE_HTTP)
     fp=op_url_stream_create(&cb,_argv[1],
      OP_SSL_SKIP_CERTIFICATE_CHECK(1),NULL);
+#else
+    fp=NULL;
+#endif
     /*Fall back assuming it's a regular file name.*/
     if(fp==NULL)fp=op_fopen(&cb,_argv[1],"rb");
   }