diff --git a/src/ntlibfuncs.h b/src/ntlibfuncs.h
index ce34a5353344e7cfeda437e39a93994851b356fe..101764dcead7ebceb786fc163b80d4ecbddd8129 100644
--- a/src/ntlibfuncs.h
+++ b/src/ntlibfuncs.h
@@ -21,4 +21,46 @@ NTLIBFUNC(kernel32, BOOL, MoveFileExW, (
   DWORD dwFlags                /* move options  */
 ));
 
+/* The following are needed for pty handling,
+ * and taken from <consoleapi.h> and <processthreadsapi.h>.
+ */
+
+NTLIBFUNC(kernel32, HRESULT, CreatePseudoConsole, (
+  COORD size,
+  HANDLE hInput,
+  HANDLE hOutput,
+  DWORD dwFlags,
+  HPCON *phPC
+));
+
+NTLIBFUNC(kernel32, HRESULT, ResizePseudoConsole, (
+  HPCON hPC,
+  COORD size
+));
+
+NTLIBFUNC(kernel32, VOID, ClosePseudoConsole, (
+  HPCON hPC
+));
+
+NTLIBFUNC(kernel32, BOOL, InitializeProcThreadAttributeList, (
+  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
+  DWORD dwAttributeCount,
+  DWORD dwFlags,
+  PSIZE_T lpSize
+));
+
+NTLIBFUNC(kernel32, VOID, DeleteProcThreadAttributeList, (
+  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList
+));
+
+NTLIBFUNC(kernel32, BOOL, UpdateProcThreadAttribute, (
+  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
+  DWORD dwFlags,
+  DWORD_PTR Attribute,
+  PVOID lpValue,
+  SIZE_T cbSize,
+  PVOID lpPreviousValue,
+  PSIZE_T lpReturnSize
+));
+
 #endif /* __NT__ */