[PR #7777] ppc64le: corrected ioctls #12515

Open
opened 2026-04-13 00:01:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7777
Author: @stormljor
Created: 11/21/2024
Status: 🔄 Open

Base: mainHead: fix-ppc64le-ioctls


📝 Commits (1)

  • a473cc5 ppc64le: corrected ioctls

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 readline/term_linux.go (+3 -2)

📄 Description

As described in #796 ollama run won't work on ppc64le out of the box, as the ioctl TCSETS is invalid.

This PR changes the ioctl to TCSETSF while also moving it away from "magic numbers".

According to man pages:

       TCSETSF
              Equivalent to tcsetattr(fd, TCSAFLUSH, argp).

              Allow the output buffer to drain, discard pending input,
              and set the current serial port settings.

I've tested this change on an x64 CPU as well, and saw no issues/regressions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/7777 **Author:** [@stormljor](https://github.com/stormljor) **Created:** 11/21/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-ppc64le-ioctls` --- ### 📝 Commits (1) - [`a473cc5`](https://github.com/ollama/ollama/commit/a473cc5e2344004f8f92ab448d627d53a1acb927) ppc64le: corrected ioctls ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `readline/term_linux.go` (+3 -2) </details> ### 📄 Description As described in #796 `ollama run` won't work on ppc64le out of the box, as the ioctl `TCSETS` is invalid. This PR changes the ioctl to `TCSETSF` while also moving it away from "magic numbers". According to man pages: ``` TCSETSF Equivalent to tcsetattr(fd, TCSAFLUSH, argp). Allow the output buffer to drain, discard pending input, and set the current serial port settings. ``` I've tested this change on an x64 CPU as well, and saw no issues/regressions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:01:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12515