diff --git a/helpers/inspect-library.c b/helpers/inspect-library.c
index 9a749b3a09a15570e208efa746566dd2f64b31ae..3c625cd6217c242e166a2f926d865cd9f7a85e2c 100644
--- a/helpers/inspect-library.c
+++ b/helpers/inspect-library.c
@@ -125,7 +125,11 @@ main (int argc,
 
   if (argc == 3)
     {
-      fp = fopen(argv[2], "r");
+      if (strcmp(argv[2], "-") == 0)
+        fp = stdin;
+      else
+        fp = fopen(argv[2], "r");
+
       if (fp == NULL)
         {
           int saved_errno = errno;