Index: google-authenticator-20170702/libpam/src/google-authenticator.c
===================================================================
--- google-authenticator-20170702.orig/libpam/src/google-authenticator.c
+++ google-authenticator-20170702/libpam/src/google-authenticator.c
@@ -203,7 +203,7 @@ static const char *getURL(const char *se
 
 // Display QR code visually. If not possible, return 0.
 static int displayQRCode(const char* url) {
-  void *qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL);
+  void *qrencode = dlopen("libqrencode.so.4", RTLD_NOW | RTLD_LOCAL);
   if (!qrencode) {
     qrencode = dlopen("libqrencode.so.3", RTLD_NOW | RTLD_LOCAL);
   }
@@ -211,6 +211,9 @@ static int displayQRCode(const char* url
     qrencode = dlopen("libqrencode.3.dylib", RTLD_NOW | RTLD_LOCAL);
   }
   if (!qrencode) {
+    qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL);
+  }
+  if (!qrencode) {
     return 0;
   }
   typedef struct {
