summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/terminal.c b/src/terminal.c
index ab96004..2875638 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -21,6 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+#define _POSIX_C_SOURCE 1 /* fileno() */
+#define _BSD_SOURCE /* setlinebuf() */
+
#include <termios.h>
#include <stdio.h>
@@ -60,14 +63,14 @@ void BarTermSetBuffer (char enable) {
/* Save old terminal settings
* @param save settings here
*/
-inline void BarTermSave (struct termios *termOrig) {
+void BarTermSave (struct termios *termOrig) {
tcgetattr (fileno (stdin), termOrig);
}
/* Restore terminal settings
* @param Old settings
*/
-inline void BarTermRestore (struct termios *termOrig) {
+void BarTermRestore (struct termios *termOrig) {
tcsetattr (fileno (stdin), TCSANOW, termOrig);
}