https://bugs.gentoo.org/948610
--- a/config_ui.c
+++ b/config_ui.c
@@ -24,11 +24,10 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkplug.h>
 
-#include <debug.h>
-#include <gtkdialogs.h>
-#include <gtkprefs.h>
-#include <gtkprefs.h>
-#include <util.h>
+#include <libpurple/debug.h>
+#include <pidgin/gtkdialogs.h>
+#include <pidgin/gtkprefs.h>
+#include <libpurple/util.h>
 
 #include "nls.h"
 #include "cryptproto.h"
--- a/config_ui.h
+++ b/config_ui.h
@@ -18,7 +18,7 @@
 #ifndef CONFIG_UI_H
 #define CONFIG_UI_H
 
-#include <plugin.h>
+#include <libpurple/plugin.h>
 
 extern GtkWidget* PE_get_config_frame(PurplePlugin *plugin);
 extern void PE_config_cancel_regen(void);
--- a/cryptproto.h
+++ b/cryptproto.h
@@ -18,7 +18,7 @@
 #ifndef CRYPTPROTO_H
 #define CRYPTPROTO_H
 
-#include "debug.h"
+#include <libpurple/debug.h>
 
 #include "rsa_nss.h"
 
--- a/cryptutil.c
+++ b/cryptutil.c
@@ -27,7 +27,7 @@
 #include <unistd.h>
 
 
-#include <debug.h>
+#include <libpurple/debug.h>
 
 #ifdef _WIN32
 #include <win32dep.h>
@@ -37,7 +37,7 @@
 #include "cryptutil.h"
 #include "rsa_nss.h"
 
-#include <base64.h>
+#include <nss/base64.h>
 
 
 
--- a/cryptutil.h
+++ b/cryptutil.h
@@ -18,7 +18,7 @@
 #ifndef CRYPTUTIL_H
 #define CRYPTUTIL_H
 
-#include "debug.h"
+#include <libpurple/debug.h>
 
 #define MSG_HUNK_SIZE 126
 #define CRYPT_HUNK_SIZE 256
--- a/encrypt.c
+++ b/encrypt.c
@@ -24,20 +24,20 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkplug.h>
 
-#include <debug.h>
-#include <core.h>
-#include <gtkutils.h>
-#include <gtkplugin.h>
-#include <gtkconv.h>
-#include <gtkdialogs.h>
-#include <gtkprefs.h>
-#include <blist.h>
-#include <gtkblist.h>
-#include <gtkimhtml.h>
-#include <gtklog.h>
-#include <signals.h>
-#include <util.h>
-#include <version.h>
+#include <libpurple/debug.h>
+#include <libpurple/core.h>
+#include <pidgin/gtkutils.h>
+#include <pidgin/gtkplugin.h>
+#include <pidgin/gtkconv.h>
+#include <pidgin/gtkdialogs.h>
+#include <pidgin/gtkprefs.h>
+#include <libpurple/blist.h>
+#include <pidgin/gtkblist.h>
+#include <pidgin/gtkimhtml.h>
+#include <pidgin/gtklog.h>
+#include <libpurple/signals.h>
+#include <libpurple/util.h>
+#include <libpurple/version.h>
 
 #include "cryptproto.h"
 #include "cryptutil.h"
@@ -212,7 +212,7 @@
       purple_conversation_write(conv, 0,
                               _("This account key is too large for this protocol. "
                                 "Unable to send."),
-                              PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                              PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
       return;
    }
 
@@ -326,7 +326,7 @@
    newnode->who[sizeof(newnode->who)-1] = 0;
 
    newnode->gc = gc;
-   newnode->time = time((time_t)NULL);
+   newnode->time = time((time_t *)NULL);
    strcpy(newnode->msg, msg);
    newnode->next = 0;
 
@@ -443,7 +443,7 @@
             }
 
             purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, tmp_msg,
-                               PURPLE_MESSAGE_RECV, time((time_t)NULL));
+                               PURPLE_MESSAGE_RECV, time((time_t *)NULL));
             
             g_free(tmp_msg);
 
@@ -670,7 +670,7 @@
             purple_debug(PURPLE_DEBUG_MISC, "pidgin-encryption", "Got key in response to error\n");
             purple_conversation_write(conv, 0,
                                       _("Last outgoing message not received properly- resetting"),
-                                      PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                      PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
             
             PE_received_key(headerpos + header_size + sizeof(": ErrKey") - 1, name, acct,
                             conv, message);
@@ -755,7 +755,7 @@
       if (conv != 0) {
          purple_conversation_write(conv, 0,
                                  _("Received message encrypted with wrong key"),
-                                 PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                 PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
 
       } else {
          purple_debug(PURPLE_DEBUG_WARNING, "pidgin-encryption",
@@ -792,7 +792,7 @@
       if (conv != 0) {
          purple_conversation_write(conv, 0,
                                  _("Error in decryption- asking for resend..."),
-                                 PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                 PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
 
       } else {
          purple_debug(PURPLE_DEBUG_WARNING, "pidgin-encryption",
@@ -939,7 +939,7 @@
 
       purple_debug(PURPLE_DEBUG_INFO, "pidgin-encryption", "requesting key\n");
       purple_conversation_write(conv, 0, _("Requesting key..."),
-                              PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                              PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
 
       PE_store_msg(who, acct->gc, *message, &first_out_msg, &last_out_msg);
 
@@ -976,7 +976,7 @@
          purple_debug(PURPLE_DEBUG_INFO, "pidgin-encryption", "im_write: %s\n", dupname);
          
          purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, disp_msg,
-                            PURPLE_MESSAGE_SEND, time((time_t)NULL));
+                            PURPLE_MESSAGE_SEND, time((time_t *)NULL));
          g_free(disp_msg);
          
          /* Add message to stash of sent messages: in case a key or nonce is wrong, we */
@@ -1073,7 +1073,7 @@
    if (his_key == 0) { /* Don't have key for this guy */
       purple_conversation_write(conv, 0,
                               _("No key to resend message.  Message lost."),
-                              PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                              PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
 
    } else {  /* We have a key.  Encrypt and send. */
 
@@ -1114,7 +1114,7 @@
                  footer);
          purple_conversation_write(conv, 0,
                                  "Resending...",
-                                 PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                 PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
          serv_send_im(conv->account->gc, name, out_msg, 0);
          
          purple_debug(PURPLE_DEBUG_INFO, "pidgin-encryption",
@@ -1126,7 +1126,7 @@
          g_free(crypt_msg);
       } else {
          purple_conversation_write(conv, 0, _("Outgoing message lost."),
-                                 PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                 PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
       }
    } 
 }
--- a/encrypt.h
+++ b/encrypt.h
@@ -24,7 +24,7 @@
 #include "pidgin-encryption-config.h"
 #endif
 
-#include <conversation.h>
+#include <libpurple/conversation.h>
 #define ENC_WEBSITE "http://pidgin-encrypt.sourceforge.net"
 
 #define CRYPTO_SMILEY "PECRYPT:"
--- a/keys.c
+++ b/keys.c
@@ -17,9 +17,9 @@
 
 #include "internal.h"
 
-#include <glib.h>
+#include <glib-2.0/glib.h>
 #if GLIB_CHECK_VERSION(2,6,0)
-#	include <glib/gstdio.h>
+#	include <glib-2.0/glib/gstdio.h>
 #else
 #	define g_freopen freopen
 #	define g_fopen fopen
@@ -37,8 +37,8 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkplug.h>
 
-#include <debug.h>
-#include <util.h>
+#include <libpurple/debug.h>
+#include <libpurple/util.h>
 
 #include <time.h>
 #include <sys/types.h>
@@ -96,7 +96,7 @@
    if (conv != 0) {
       purple_conversation_write(conv, "Encryption Manager",
                               _("Making new key pair..."),
-                              PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                              PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
    }
    
    PE_make_private_pair((crypt_proto *)crypt_proto_list->data, name, conv->account, 1024);
@@ -113,7 +113,7 @@
    if (conv != 0) {
       purple_conversation_write(conv, "Encryption Manager",
                               _("Error trying to make key."),
-                              PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                              PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
    }
    
    return 0;
@@ -278,7 +278,7 @@
    case KEY_CONFLICT:
       if (conv) {
          purple_conversation_write(conv, "Encryption Manager", _("Conflicting Key Received!"),
-                                 PURPLE_MESSAGE_SYSTEM, time((time_t)NULL));
+                                 PURPLE_MESSAGE_SYSTEM, time((time_t *)NULL));
       }
       PE_choose_accept_conflict_key(new_key, resend_msg_id, conv);
       break;
--- a/keys.h
+++ b/keys.h
@@ -20,8 +20,8 @@
 
 #include "cryptproto.h"
 
-#include "debug.h"
-#include "conversation.h"
+#include <libpurple/debug.h>
+#include <libpurple/conversation.h>
 
 
 #define KEY_DIGEST_LENGTH 10
--- a/keys_ui.c
+++ b/keys_ui.c
@@ -21,10 +21,10 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkplug.h>
 
-#include <debug.h>
-#include <prefs.h>
-#include <gtkdialogs.h>
-#include <sound.h>
+#include <libpurple/debug.h>
+#include <libpurple/prefs.h>
+#include <pidgin/gtkdialogs.h>
+#include <libpurple/sound.h>
 
 #include "encrypt.h"
 #include "keys.h"
--- a/nonce.c
+++ b/nonce.c
@@ -17,12 +17,12 @@
 
 #include "internal.h"
 
-#include <glib.h>
+#include <glib-2.0/glib.h>
 
-#include "debug.h"
+#include <libpurple/debug.h>
 
-#include "base64.h"
-#include "pk11func.h"
+#include <nss/base64.h>
+#include <nss/pk11func.h>
 
 #include "nonce.h"
 
--- a/nonce.h
+++ b/nonce.h
@@ -18,7 +18,7 @@
 #ifndef NONCE_H
 #define NONCE_H
 
-#include "glib.h"
+#include "glib-2.0/glib.h"
 
 typedef unsigned char Nonce[24];
 
--- a/nss_mgf1.c
+++ b/nss_mgf1.c
@@ -18,10 +18,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <pk11func.h>
+#include <nss/pk11func.h>
 
 /* for g_assert; PORT_Assert seems disabled... */
-#include <glib.h>
+#include <glib-2.0/glib.h>
 
 #include "nss_mgf1.h"
 
--- a/nss_oaep.c
+++ b/nss_oaep.c
@@ -19,11 +19,11 @@
  *
  */
 
-#include <pk11func.h>
-#include <keyhi.h>
+#include <nss/pk11func.h>
+#include <nss/keyhi.h>
 
 /* for g_assert; PORT_Assert seems disabled... */
-#include <glib.h>
+#include <glib-2.0/glib.h>
 
 #include "nss_mgf1.h"
 #include "nss_oaep.h"
--- a/nss_pss.c
+++ b/nss_pss.c
@@ -19,12 +19,12 @@
  *
  */
 
-#include "pk11func.h"
-#include "keyhi.h"
+#include <nss/pk11func.h>
+#include <nss/keyhi.h>
 
 /* for g_assert; PORT_Assert seems disabled... */
-#include <glib.h>
-#include <debug.h>
+#include <glib-2.0/glib.h>
+#include <libpurple/debug.h>
 
 #include "nss_mgf1.h"
 #include "nss_pss.h"
--- a/pe_blist.c
+++ b/pe_blist.c
@@ -1,8 +1,8 @@
 #include "internal.h"  // #defines needed for Gaim headers
 
-#include <blist.h>
-#include <debug.h>
-#include <gtkutils.h>
+#include <libpurple/blist.h>
+#include <libpurple/debug.h>
+#include <pidgin/gtkutils.h>
 
 #include "pe_blist.h"
 #include "state.h"
--- a/pe_blist.h
+++ b/pe_blist.h
@@ -4,8 +4,8 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkplug.h>
 
-#include <gtkplugin.h>
-#include <blist.h>
+#include <pidgin/gtkplugin.h>
+#include <libpurple/blist.h>
 
 #include "pidgin-encryption-config.h"
 
--- a/prefs.c
+++ b/prefs.c
@@ -21,9 +21,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <glib.h>
+#include <glib-2.0/glib.h>
 #if GLIB_CHECK_VERSION(2,6,0)
-#	include <glib/gstdio.h>
+#	include <glib-2.0/glib/gstdio.h>
 #else
 #	define g_freopen freopen
 #	define g_fopen fopen
@@ -41,8 +41,8 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkplug.h>
 
-#include "prefs.h"
-#include "util.h"
+#include <libpurple/prefs.h>
+#include <libpurple/util.h>
 #include "prefs.h"
 #include "config_ui.h"
 #include "keys.h"
--- a/prefs.h
+++ b/prefs.h
@@ -19,9 +19,9 @@
 #ifndef PREFS_H
 #define PREFS_H
 
-#include <debug.h>
-#include <gtkdialogs.h>
-#include <prefs.h>
+#include <libpurple/debug.h>
+#include <pidgin/gtkdialogs.h>
+#include <libpurple/prefs.h>
 
 void PE_prefs_changed_cb(const char* name, PurplePrefType type, gconstpointer val, gpointer data);
 
--- a/rsa_nss.c
+++ b/rsa_nss.c
@@ -21,10 +21,10 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkplug.h>
 
-#include <debug.h>
-#include <gtkdialogs.h>
+#include <libpurple/debug.h>
+#include <pidgin/gtkdialogs.h>
 
-#include <glib.h>
+#include <glib-2.0/glib.h>
 
 #include <string.h>
 #include <assert.h>
@@ -35,13 +35,13 @@
 
 #include "rsa_nss.h"
 
-#include <nspr.h>
-#include <nss.h>
-#include <ssl.h>
-#include <secmod.h>
-#include <pk11func.h>
-#include <keyhi.h>
-#include <nssb64.h>
+#include <nspr/nspr.h>
+#include <nss/nss.h>
+#include <nss/ssl.h>
+#include <nss/secmod.h>
+#include <nss/pk11func.h>
+#include <nss/keyhi.h>
+#include <nss/nssb64.h>
 
 
 #include "nls.h"
--- a/rsa_nss.h
+++ b/rsa_nss.h
@@ -29,8 +29,8 @@
 #undef HAVE_LONG_LONG
 #endif
 /* From NSS libraries: */
-#include <nss.h>
-#include <keyhi.h>
+#include <nss/nss.h>
+#include <nss/keyhi.h>
 
 typedef struct {
    SECKEYPrivateKey* priv;
--- a/state.c
+++ b/state.c
@@ -6,11 +6,11 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkplug.h>
 
-#include <gtkplugin.h>
+#include <pidgin/gtkplugin.h>
 
-#include <debug.h>
-#include <util.h>
-#include <conversation.h>
+#include <libpurple/debug.h>
+#include <libpurple/util.h>
+#include <libpurple/conversation.h>
 
 #include "pe_blist.h"
 #include "state_ui.h"
--- a/state_ui.c
+++ b/state_ui.c
@@ -7,11 +7,11 @@
 #include <gtk/gtkplug.h>
 #include <gtk/gtkimagemenuitem.h>
 
-#include <gtkplugin.h>
-#include <gtkmenutray.h>
-#include <debug.h>
-#include <gtkimhtml.h>
-#include <gtklog.h>
+#include <pidgin/gtkplugin.h>
+#include <pidgin/gtkmenutray.h>
+#include <libpurple/debug.h>
+#include <pidgin/gtkimhtml.h>
+#include <pidgin/gtklog.h>
 
 #include "state_ui.h"
 #include "state.h"
--- a/state_ui.h
+++ b/state_ui.h
@@ -7,13 +7,13 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkplug.h>
 
-#include "gtkplugin.h"
+#include <pidgin/gtkplugin.h>
 
-#include <gtkdialogs.h>
-#include <log.h>
-#include <gtkconv.h>
-#include <gtklog.h>
-#include <gtkutils.h>
+#include <pidgin/gtkdialogs.h>
+#include <libpurple/log.h>
+#include <pidgin/gtkconv.h>
+#include <pidgin/gtklog.h>
+#include <pidgin/gtkutils.h>
 
 void PE_state_ui_init();
 void PE_state_ui_delete();
